Tracing
Dependencies: IO
No symbols match your filter.
Commands
Tracing.end
Stop trace events collection.
Tracing.getCategories
Experimental Gets supported tracing categories.
Return Object
| Name | Type | Description |
|---|---|---|
categories
|
array<string> |
A list of supported tracing categories. |
Tracing.getTrackEventDescriptor
Experimental Return a descriptor for all available tracing categories.
Return Object
| Name | Type | Description |
|---|---|---|
descriptor
|
binary |
Base64-encoded serialized perfetto.protos.TrackEventDescriptor protobuf message. |
Tracing.recordClockSyncMarker
Experimental Record a clock sync marker in the trace.
Parameters
| Name | Type | Description |
|---|---|---|
syncId
|
string |
The ID of this clock sync marker |
Tracing.requestMemoryDump
Experimental Request a global memory dump.
Parameters
| Name | Type | Description |
|---|---|---|
deterministic
(optional) |
boolean |
Enables more deterministic results by forcing garbage collection |
levelOfDetail
(optional) |
MemoryDumpLevelOfDetail |
Specifies level of details in memory dump. Defaults to "detailed". |
Return Object
| Name | Type | Description |
|---|---|---|
dumpGuid
|
string |
GUID of the resulting global memory dump. |
success
|
boolean |
True iff the global memory dump succeeded. |
Tracing.start
Start trace events collection.
Parameters
| Name | Type | Description |
|---|---|---|
categories
(optional) Experimental Deprecated |
string |
Category/tag filter |
options
(optional) Experimental Deprecated |
string |
Tracing options |
bufferUsageReportingInterval
(optional) Experimental |
number |
If set, the agent will issue bufferUsage events at this interval, specified in milliseconds |
transferMode
(optional) |
string |
Whether to report trace events as series of dataCollected events or to save trace to a stream (defaults to `ReportEvents`). |
streamFormat
(optional) |
StreamFormat |
Trace data format to use. This only applies when using `ReturnAsStream` transfer mode (defaults to `json`). |
streamCompression
(optional) Experimental |
StreamCompression |
Compression format to use. This only applies when using `ReturnAsStream` transfer mode (defaults to `none`) |
traceConfig
(optional) |
TraceConfig |
|
perfettoConfig
(optional) Experimental |
binary |
Base64-encoded serialized perfetto.protos.TraceConfig protobuf message When specified, the parameters `categories`, `options`, `traceConfig` are ignored. |
tracingBackend
(optional) Experimental |
TracingBackend |
Backend type (defaults to `auto`) |
Events
Tracing.bufferUsage
Experimental Parameters
| Name | Type | Description |
|---|---|---|
percentFull
(optional) |
number |
A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size. |
eventCount
(optional) |
number |
An approximate number of events in the trace log. |
value
(optional) |
number |
A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size. |
Tracing.dataCollected
Experimental Contains a bucket of collected trace events. When tracing is stopped collected events will be
sent as a sequence of dataCollected events followed by tracingComplete event.
Parameters
| Name | Type | Description |
|---|---|---|
value
|
array<object> |
Tracing.tracingComplete
Signals that tracing is stopped and there is no trace buffers pending flush, all data were
delivered via dataCollected events.
Parameters
| Name | Type | Description |
|---|---|---|
dataLossOccurred
|
boolean |
Indicates whether some trace data is known to have been lost, e.g. because the trace ring buffer wrapped around. |
stream
(optional) |
IO.StreamHandle |
A handle of the stream that holds resulting trace data. |
traceFormat
(optional) |
StreamFormat |
Trace data format of returned stream. |
streamCompression
(optional) |
StreamCompression |
Compression format of returned stream. |
Types
MemoryDumpConfig
(object)
Experimental Configuration for memory dump. Used only when "memory-infra" category is enabled.
TraceConfig
(object)
Properties
| Name | Type | Description |
|---|---|---|
recordMode
(optional) Experimental |
string |
Controls how the trace buffer stores data. The default is `recordUntilFull`. |
traceBufferSizeInKb
(optional) Experimental |
number |
Size of the trace buffer in kilobytes. If not specified or zero is passed, a default value of 200 MB would be used. |
enableSampling
(optional) Experimental |
boolean |
Turns on JavaScript stack sampling. |
enableSystrace
(optional) Experimental |
boolean |
Turns on system tracing. |
enableArgumentFilter
(optional) Experimental |
boolean |
Turns on argument filter. |
includedCategories
(optional) |
array<string> |
Included category filters. |
excludedCategories
(optional) |
array<string> |
Excluded category filters. |
syntheticDelays
(optional) Experimental |
array<string> |
Configuration to synthesize the delays in tracing. |
memoryDumpConfig
(optional) Experimental |
MemoryDumpConfig |
Configuration for memory dump triggers. Used only when "memory-infra" category is enabled. |
StreamFormat
(string)
Experimental Data format of a trace. Can be either the legacy JSON format or the
protocol buffer format. Note that the JSON format will be deprecated soon.
Allowed Values
jsonproto
StreamCompression
(string)
Experimental Compression type to use for traces returned via streams.
Allowed Values
nonegzip
MemoryDumpLevelOfDetail
(string)
Experimental Details exposed when memory request explicitly declared.
Keep consistent with memory_dump_request_args.h and
memory_instrumentation.mojom
Allowed Values
backgroundlightdetailed
TracingBackend
(string)
Experimental Backend type to use for tracing. `chrome` uses the Chrome-integrated
tracing service and is supported on all platforms. `system` is only
supported on Chrome OS and uses the Perfetto system tracing service.
`auto` chooses `system` when the perfettoConfig provided to Tracing.start
specifies at least one non-Chrome data source; otherwise uses `chrome`.
Allowed Values
autochromesystem