Profiler Domain
Methods
enable#
disable#
setSamplingInterval#
Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
Parameters
- interval
- integer New sampling interval in microseconds.
start#
Events
consoleProfileStarted#
Sent when new profile recodring is started using console.profile() call.
Parameters
- id
- string
- location
- Debugger.Location Location of console.profile().
- title
- string Profile title passed as argument to console.profile().
consoleProfileFinished#
Parameters
- id
- string
- location
- Debugger.Location Location of console.profileEnd().
- profile
- CPUProfile
- title
- string Profile title passed as argunet to console.profile().
Types
CPUProfileNode#
CPU Profile node. Holds callsite information, execution statistics and child nodes.
Type: object
Properties
- functionName
- string Function name.
- scriptId
- Debugger.ScriptId Script identifier.
- url
- string URL.
- lineNumber
- integer 1-based line number of the function start position.
- columnNumber
- integer 1-based column number of the function start position.
- hitCount
- integer Number of samples where this node was on top of the call stack.
- callUID
- number Call UID.
- children
- array [ CPUProfileNode ] Child nodes.
- deoptReason
- string The reason of being not optimized. The function may be deoptimized or marked as don't optimize.
- id
- integer Unique id of the node.
- positionTicks
- array [ PositionTickInfo ] An array of source position ticks.
CPUProfile#
Profile.
Type: object
Properties
- head
- CPUProfileNode
- startTime
- number Profiling start time in seconds.
- endTime
- number Profiling end time in seconds.
- samples
- array [integer] Ids of samples top nodes.
- timestamps
- array [number] Timestamps of the samples in microseconds.
PositionTickInfo#
Specifies a number of samples attributed to a certain source position.
Type: object
Properties
- line
- integer Source line number (1-based).
- ticks
- integer Number of samples attributed to the source line.