openmixer — generated API reference
    Preparing search index...

    Class PerfRegistry

    A server's whole collection of named op histograms. forOp() returns (creating on first use) a stable PerfHistogram reference a hot-path caller can cache once and call .record() on directly — the ideal shape for a per-request/per-broadcast call site, since it skips the map lookup that record(name, ms) pays every time.

    Index
    • get enabled(): boolean

      Whether recording is active. A disabled registry's record() is a single branch.

      Returns boolean

    • set enabled(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • The stable histogram for one op name, creating it on first use. Cache the returned reference at a hot call site instead of calling this (or record) every time — it is a Map lookup plus, on the very first call per op, one allocation.

      Parameters

      • op: string

      Returns PerfHistogram

    • Record one sample by op name (looks up/creates via forOp — prefer caching that for hot paths).

      Parameters

      • op: string
      • ms: number

      Returns void

    • Zero every histogram in place (keeps the registered op set).

      Returns void

    • A snapshot of every op recorded so far, sorted by name. Allocates — a reporting-path call.

      Returns PerfOpSnapshot[]