13.3. 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.3.1. Profiler control

profiler::set_enable_profiler(ctxId: uint64; enabled: bool)

Enables or disables the profiler for the given context ID.

Arguments
  • ctxId : uint64

  • enabled : bool