Exposes the browser's profiler.

Permissions: geckoProfiler

Not allowed in: Content scripts, Devtools pages

_StartSettings
ProfilerFeature
Supports
onRunning
dumpProfileToFile
getProfile
getProfileAsArrayBuffer
getProfileAsGzippedArrayBuffer
getSymbols
pause
resume
start
stop
ProfilerFeature:
    | "java"
    | "js"
    | "mainthreadio"
    | "fileio"
    | "fileioall"
    | "nomarkerstacks"
    | "screenshots"
    | "seqstyle"
    | "stackwalk"
    | "jsallocations"
    | "nostacksampling"
    | "nativeallocations"
    | "ipcmessages"
    | "audiocallbacktracing"
    | "cpu"
    | "notimerresolutionchange"
    | "cpuallthreads"
    | "samplingallthreads"
    | "markersallthreads"
    | "unregisteredthreads"
    | "processcpu"
    | "power"
    | "responsiveness"
    | "cpufreq"
Supports: "windowLength"
onRunning: WebExtEvent<(isRunning: boolean) => void>

Fires when the profiler starts/stops running.

Whether the profiler is running or not. Pausing the profiler will not affect this value.

  • Gathers the profile data from the current profiling session, and writes it to disk. The returned promise resolves to a path that locates the created file.

    Parameters

    • fileName: string

      The name of the file inside the profile/profiler directory

    Returns Promise<any>

  • Gathers the profile data from the current profiling session.

    Returns Promise<any>

  • Gathers the profile data from the current profiling session. The returned promise resolves to an array buffer that contains a JSON string.

    Returns Promise<any>

  • Gathers the profile data from the current profiling session. The returned promise resolves to an array buffer that contains a gzipped JSON string.

    Returns Promise<any>

  • Gets the debug symbols for a particular library.

    Parameters

    • debugName: string

      The name of the library's debug file. For example, 'xul.pdb

    • breakpadId: string

      The Breakpad ID of the library

    Returns Promise<any>

  • Pauses the profiler, keeping any profile data that is already written.

    Returns Promise<any>

  • Resumes the profiler with the settings that were initially used to start it.

    Returns Promise<any>

  • Starts the profiler with the specified settings.

    Parameters

    Returns Promise<any>

  • Stops the profiler and discards any captured profile data.

    Returns Promise<any>