Extends Actor
Main interface for interacting with nsIProfiler
Starts the nsIProfiler module. Doing so will discard any samples that might have been accumulated so far.
Parameters
entries
Number number of entriesinterval
Number recording intervalfeatures
Array<String> list of features to includethreadFilters
Array<String> list of thread filters
Returns Promise.Object request response
Attempts to stop the nsIProfiler module.
Returns Promise.Object request response
Returns all the samples accumulated since the profiler was started, along with the current time. The data has the following format: { libs: string, meta: { interval: number, platform: string, ... }, threads: [{ samples: [{ frames: [{ line: number, location: string, category: number } ... ], name: string responsiveness: number time: number } ... ] } ... ] }
Parameters
startTime
Number Since the circular buffer will only grow as long as the profiler lives, the buffer can contain unwanted samples. Pass in astartTime
to only retrieve samples that took place after thestartTime
, with 0 being when the profiler just started.stringify
Boolean Whether or not the returned profile object should be a string or not to save JSON parse/stringify cycle if emitting over RDP.
Returns an array of feature strings, describing the profiler features that are available on this platform. Can be called while the profiler is stopped.
Returns Array<Promise.String> list of feature strings
Returns an object with the values of the current status of the
circular buffer in the profiler, returning position
, totalSize
,
and the current generation
of the buffer.
Returns Promise.Object current status of the circular buffer
Returns the configuration used that was originally passed in to start up the profiler. Used for tests, and does not account for others using nsIProfiler.
Returns Promise.Object profiler configurations
Verifies whether or not the nsIProfiler module has started. If already active, the current time is also returned.
Returns Promise.Boolean true if nsIProfiler module has started
Returns an array of objects that describes the shared libraries which are currently loaded into our process. Can be called while the profiler is stopped.
Returns Array<Promise.Object> list of objects that describes the shared libraries
Registers handlers for the following events to be emitted on active Profiler instances:
- "console-api-profiler"
- "profiler-started"
- "profiler-stopped"
- "profiler-status"
The ProfilerManager listens to all events, and individual consumers filter which events they are interested in.
Parameters
Returns Promise request response
Unregisters handlers for all system events.
Parameters
Returns Promise request response
Updates the frequency that the "profiler-status" event is emitted during recording.
Parameters
interval
Number interval of recording