# std/nimprof

Theme:

- Manual
- Standard library
- Index
- Compiler docs
- Fusion docs
- devel, stable

Search:
Source Edit

Profiling support for Nim. This is an embedded profiler that requires `--profiler:on`. You only need to import this module to get a profiling report at program exit. See Embedded Stack Trace Profiler for usage.Timer support for the realtime GC. Based on https://github.com/jckarter/clay/blob/master/compiler/hirestimer.cpp

# Imports

hashes, algorithm, strutils, tables, sets, locks, exitprocs

# Procs

    proc disableProfiling() {....raises: [], tags: [], forbids: [].}

  Source Edit

    proc enableProfiling() {....raises: [], tags: [], forbids: [].}

  Source Edit

    proc setSamplingFrequency(intervalInUs: int) {....raises: [], tags: [], forbids: [].}

  set this to change the sampling frequency. Default value is 5ms. Set it to 0 to disable time based profiling; it uses an imprecise instruction count measure instead then. Source Edit