Methods

React NativeChrome DevTools

Tracing.end #

Stop trace events collection.

Tracing.end is implemented as a stub only.


React NativeChrome DevTools

Tracing.start #

Start trace events collection.

Tracing.start is implemented as a stub only.

Parameters

categories
Optional
string

Category/tag filter

ExperimentalDeprecated
options
Optional
string

Tracing options

ExperimentalDeprecated
bufferUsageReportingInterval
Optional
number

If set, the agent will issue bufferUsage events at this interval, specified in milliseconds

Experimental
transferMode
Optional
string

Whether to report trace events as series of dataCollected events or to save trace to a stream (defaults to ReportEvents).

Allowed values: ReportEvents, ReturnAsStream

streamFormat
Optional
StreamFormat

Trace data format to use. This only applies when using ReturnAsStream transfer mode (defaults to json).

streamCompression
Optional
StreamCompression

Compression format to use. This only applies when using ReturnAsStream transfer mode (defaults to none)

Experimental
traceConfig
Optional
perfettoConfig
Optional
string

Base64-encoded serialized perfetto.protos.TraceConfig protobuf message When specified, the parameters categories, options, traceConfig are ignored. (Encoded as a base64 string when passed over JSON)

Experimental
tracingBackend
Optional
TracingBackend

Backend type (defaults to auto)

Experimental

Chrome DevTools

Tracing.getCategories Experimental#

Gets supported tracing categories.

Return object

categories
array[ string ]

A list of supported tracing categories.


Chrome DevTools

Tracing.recordClockSyncMarker Experimental#

Record a clock sync marker in the trace.

Parameters

syncId
string

The ID of this clock sync marker


Chrome DevTools

Tracing.requestMemoryDump Experimental#

Request a global memory dump.

Parameters

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

dumpGuid
string

GUID of the resulting global memory dump.

success
boolean

True iff the global memory dump succeeded.

Events

React NativeChrome DevTools

Tracing.tracingComplete #

Signals that tracing is stopped and there is no trace buffers pending flush, all data were delivered via dataCollected events.

Tracing.tracingComplete is implemented as a stub only.

Parameters

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.


React NativeChrome DevTools

Tracing.bufferUsage Experimental#

Tracing.bufferUsage is implemented as a stub only.

Parameters

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.


React NativeChrome DevTools

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.

Tracing.dataCollected is implemented as a stub only.

Parameters

value
array[ object ]

Types

Chrome DevTools

Tracing.TraceConfig #

Type: object

Properties

recordMode
Optional
string

Controls how the trace buffer stores data.

Allowed values: recordUntilFull, recordContinuously, recordAsMuchAsPossible, echoToConsole

Experimental
traceBufferSizeInKb
Optional
number

Size of the trace buffer in kilobytes. If not specified or zero is passed, a default value of 200 MB would be used.

Experimental
enableSampling
Optional
boolean

Turns on JavaScript stack sampling.

Experimental
enableSystrace
Optional
boolean

Turns on system tracing.

Experimental
enableArgumentFilter
Optional
boolean

Turns on argument filter.

Experimental
includedCategories
Optional
array[ string ]

Included category filters.

excludedCategories
Optional
array[ string ]

Excluded category filters.

syntheticDelays
Optional
array[ string ]

Configuration to synthesize the delays in tracing.

Experimental
memoryDumpConfig
Optional
MemoryDumpConfig

Configuration for memory dump triggers. Used only when "memory-infra" category is enabled.

Experimental

Chrome DevTools

Tracing.MemoryDumpConfig Experimental#

Configuration for memory dump. Used only when "memory-infra" category is enabled.

Type: object


Chrome DevTools

Tracing.MemoryDumpLevelOfDetail Experimental#

Details exposed when memory request explicitly declared. Keep consistent with memory_dump_request_args.h and memory_instrumentation.mojom

Type: string

Allowed values: background, light, detailed


Chrome DevTools

Tracing.StreamCompression Experimental#

Compression type to use for traces returned via streams.

Type: string

Allowed values: none, gzip


Chrome DevTools

Tracing.StreamFormat 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.

Type: string

Allowed values: json, proto


Chrome DevTools

Tracing.TracingBackend 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.

Type: string

Allowed values: auto, chrome, system