13.2. Instrumenting profiler
The PROFILER module provides CPU profiling infrastructure for measuring function execution times. It includes instrumentation-based profiling with hierarchical call tracking and timing statistics.
See also Profiler cross-context helpers for cross-context profiler control and scoped timing macros.
All functions and symbols are in “profiler” module, use require to get access to it.
require daslib/profiler
13.2.1. Profiler control
- set_enable_profiler(ctxId: uint64; enabled: bool)
Enables or disables the profiler for the given context ID.
- Arguments:
ctxId : uint64
enabled : bool
- set_enable_profiler_log(ctxId: uint64; enabled: bool)
Enables or disables the profiler log for the given context ID.
- Arguments:
ctxId : uint64
enabled : bool