Documentation - v6.7.1
    Preparing search index...

    Interface Profiler

    A running JS Self-Profiling session.

    interface Profiler {
        sampleInterval: number;
        stopped: boolean;
        addEventListener<K extends "samplebufferfull">(
            type: K,
            listener: (ev: ProfilerEventMap[K]) => any,
            options?: boolean | AddEventListenerOptions,
        ): void;
        addEventListener(
            type: string,
            listener: EventListenerOrEventListenerObject,
            options?: boolean | AddEventListenerOptions,
        ): void;
        dispatchEvent(event: Event): boolean;
        dispatchEvent(event: Event): boolean;
        removeEventListener<K extends "samplebufferfull">(
            type: K,
            listener: (ev: ProfilerEventMap[K]) => any,
            options?: boolean | EventListenerOptions,
        ): void;
        removeEventListener(
            type: string,
            listener: EventListenerOrEventListenerObject,
            options?: boolean | EventListenerOptions,
        ): void;
        stop(): Promise<ProfilerTrace>;
    }

    Hierarchy (View Summary)

    Index
    sampleInterval: number

    The actual sample interval in ms (may differ from the requested value).

    stopped: boolean

    Whether the profiler has been stopped.

    • Adds a typed listener for the given profiler event.

      Type Parameters

      • K extends "samplebufferfull"

      Parameters

      • type: K
      • listener: (ev: ProfilerEventMap[K]) => any
      • Optionaloptions: boolean | AddEventListenerOptions

      Returns void

    • Parameters

      • type: string
      • listener: EventListenerOrEventListenerObject
      • Optionaloptions: boolean | AddEventListenerOptions

      Returns void

    • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().

      MDN Reference

      Parameters

      Returns boolean

    • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().

      MDN Reference

      Parameters

      Returns boolean

    • Removes a typed listener for the given profiler event.

      Type Parameters

      • K extends "samplebufferfull"

      Parameters

      • type: K
      • listener: (ev: ProfilerEventMap[K]) => any
      • Optionaloptions: boolean | EventListenerOptions

      Returns void

    • Parameters

      • type: string
      • listener: EventListenerOrEventListenerObject
      • Optionaloptions: boolean | EventListenerOptions

      Returns void