stable (1.2) latest (tip-of-tree) v8-inspector (node) Home
Domains
Accessibility Animation ApplicationCache Audits Browser CSS CacheStorage Console DOM DOMDebugger DOMSnapshot DOMStorage Database Debugger DeviceOrientation Emulation HeadlessExperimental HeapProfiler IO IndexedDB Input Inspector LayerTree Log Memory Network Overlay Page Performance Profiler Runtime Schema Security ServiceWorker Storage SystemInfo Target Tethering Tracing
Chrome DevTools Protocol Viewer - latest (tip-of-tree)

Profiler Domain

Methods

Profiler.enable

Profiler.disable

Profiler.setSamplingInterval

Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.

Parameters
interval
integer New sampling interval in microseconds.

Profiler.start

Profiler.stop

Return object
profile
Profile Recorded profile.

Profiler.startPreciseCoverage

Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. Experimental

Parameters
callCount
boolean Collect accurate call counts beyond simple 'covered' or 'not covered'.
detailed
boolean Collect block-based coverage.

Profiler.stopPreciseCoverage

Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. Experimental

Profiler.takePreciseCoverage

Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. Experimental

Return object
result
array [ ScriptCoverage ] Coverage data for the current isolate.

Profiler.getBestEffortCoverage

Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. Experimental

Return object
result
array [ ScriptCoverage ] Coverage data for the current isolate.

Profiler.startTypeProfile

Enable type profile. Experimental

Profiler.stopTypeProfile

Disable type profile. Disabling releases type profile data collected so far. Experimental

Profiler.takeTypeProfile

Collect type profile. Experimental

Return object
result
array [ ScriptTypeProfile ] Type profile for all scripts since startTypeProfile() was turned on.

Events

Profiler.consoleProfileStarted

Sent when new profile recording is started using console.profile() call.

Parameters
id
string
location
Debugger.Location Location of console.profile().
title
string Profile title passed as an argument to console.profile().

Profiler.consoleProfileFinished

Parameters
id
string
location
Debugger.Location Location of console.profileEnd().
profile
Profile
title
string Profile title passed as an argument to console.profile().

Types

ProfileNode

Profile node. Holds callsite information, execution statistics and child nodes.

Type: object

Properties
id
integer Unique id of the node.
callFrame
Runtime.CallFrame Function location.
hitCount
integer Number of samples where this node was on top of the call stack. Experimental
children
array [integer] Child node ids.
deoptReason
string The reason of being not optimized. The function may be deoptimized or marked as don't optimize.
positionTicks
array [ PositionTickInfo ] An array of source position ticks. Experimental

Profile

Profile.

Type: object

Properties
nodes
array [ ProfileNode ] The list of profile nodes. First item is the root node.
startTime
number Profiling start timestamp in microseconds.
endTime
number Profiling end timestamp in microseconds.
samples
array [integer] Ids of samples top nodes.
timeDeltas
array [integer] Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime.

PositionTickInfo

Specifies a number of samples attributed to a certain source position. Experimental

Type: object

Properties
line
integer Source line number (1-based).
ticks
integer Number of samples attributed to the source line.

CoverageRange

Coverage data for a source range. Experimental

Type: object

Properties
startOffset
integer JavaScript script source offset for the range start.
endOffset
integer JavaScript script source offset for the range end.
count
integer Collected execution count of the source range.

FunctionCoverage

Coverage data for a JavaScript function. Experimental

Type: object

Properties
functionName
string JavaScript function name.
ranges
array [ CoverageRange ] Source ranges inside the function with coverage data.
isBlockCoverage
boolean Whether coverage data for this function has block granularity.

ScriptCoverage

Coverage data for a JavaScript script. Experimental

Type: object

Properties
scriptId
Runtime.ScriptId JavaScript script id.
url
string JavaScript script name or url.
functions
array [ FunctionCoverage ] Functions contained in the script that has coverage data.

TypeObject

Describes a type collected during runtime. Experimental

Type: object

Properties
name
string Name of a type collected with type profiling.

TypeProfileEntry

Source offset and types for a parameter or return value. Experimental

Type: object

Properties
offset
integer Source offset of the parameter or end of function for return values.
types
array [ TypeObject ] The types for this parameter or return value.

ScriptTypeProfile

Type profile data collected during runtime for a JavaScript script. Experimental

Type: object

Properties
scriptId
Runtime.ScriptId JavaScript script id.
url
string JavaScript script name or url.
entries
array [ TypeProfileEntry ] Type profile entries for parameters and return values of the functions in the script.