traceperf
    Preparing search index...

    Interface TracePerfConfig

    Configuration for createTracePerf() / new OptimizedPerformanceMonitor()

    interface TracePerfConfig {
        asyncLocalStorage?: new () => any;
        blockingThreshold?: number;
        enabled?: boolean;
        enableNestedTracking?: boolean;
        onComplete?: (root: ExecutionRecord) => void;
        plugins?: TracePerfPlugin[];
        reporter?: (root: ExecutionRecord) => void;
        sampleRate?: number;
        silent?: boolean;
        stats?: boolean | StatsOptions;
        threshold?: number;
        trackingMode?: TrackingModeName;
        trackMemory?: boolean;
    }

    Hierarchy (View Summary)

    Index
    asyncLocalStorage?: new () => any

    AsyncLocalStorage class to use for nesting across await. Detected automatically on Node.js, Bun, Deno and where it is a global; pass it explicitly on runtimes where it is only importable, e.g. Cloudflare Workers: import { AsyncLocalStorage } from 'node:async_hooks'.

    blockingThreshold?: number

    Detailed mode flags calls whose synchronous part runs at least this long (ms, default 50; 0 disables)

    enabled?: boolean

    Set to false to make every tracked function a plain pass-through

    enableNestedTracking?: boolean

    Attach nested tracked calls to their caller (default true)

    onComplete?: (root: ExecutionRecord) => void

    Called with every finished top-level tree (also when silent)

    plugins?: TracePerfPlugin[]

    Plugins/exporters to register

    reporter?: (root: ExecutionRecord) => void

    Replace console output: called with each reported top-level tree

    sampleRate?: number

    Fraction of calls to track (default 1)

    silent?: boolean

    Suppress console output (stats, hooks and exporters still run)

    stats?: boolean | StatsOptions

    Collect per-label statistics (default true)

    threshold?: number

    Only report calls taking at least this many milliseconds (default 0)

    trackingMode?: TrackingModeName

    Detail level (default "balanced")

    trackMemory?: boolean

    Record heap change per call (default true)