start method
- @Deprecated('This parameter is deprecated') String? categories,
- @Deprecated('This parameter is deprecated') String? options,
- num? bufferUsageReportingInterval,
- @Enum.new(['ReportEvents', 'ReturnAsStream']) String? transferMode,
- StreamFormat? streamFormat,
- StreamCompression? streamCompression,
- TraceConfig? traceConfig,
- String? perfettoConfig,
- TracingBackend? tracingBackend,
- int? screenshotMaxSize,
- int? screenshotMaxCount,
Start trace events collection.
bufferUsageReportingInterval If set, the agent will issue bufferUsage events at this interval, specified in milliseconds
transferMode Whether to report trace events as series of dataCollected events or to save trace to a
stream (defaults to ReportEvents).
streamFormat Trace data format to use. This only applies when using ReturnAsStream
transfer mode (defaults to json).
streamCompression Compression format to use. This only applies when using ReturnAsStream
transfer mode (defaults to none)
perfettoConfig Base64-encoded serialized perfetto.protos.TraceConfig protobuf message
When specified, the parameters categories, options, traceConfig
are ignored.
tracingBackend Backend type (defaults to auto)
screenshotMaxSize Maximum width and height (in pixels) of each captured screenshot.
Only used when the disabled-by-default-devtools.screenshot category is
enabled. Defaults to 500. The combined memory footprint of screenshots
(screenshotMaxSize * screenshotMaxSize * 4 * screenshotMaxCount)
is clamped to the existing per-session budget.
screenshotMaxCount Maximum number of screenshots captured during a single tracing session.
Only used when the disabled-by-default-devtools.screenshot category is
enabled. Defaults to 450. Clamped together with screenshotMaxSize to
stay within the per-session screenshot memory budget.
Implementation
Future<void> start({
@Deprecated('This parameter is deprecated') String? categories,
@Deprecated('This parameter is deprecated') String? options,
num? bufferUsageReportingInterval,
@Enum(['ReportEvents', 'ReturnAsStream']) String? transferMode,
StreamFormat? streamFormat,
StreamCompression? streamCompression,
TraceConfig? traceConfig,
String? perfettoConfig,
TracingBackend? tracingBackend,
int? screenshotMaxSize,
int? screenshotMaxCount,
}) async {
assert(
transferMode == null ||
const ['ReportEvents', 'ReturnAsStream'].contains(transferMode),
);
await _client.send('Tracing.start', {
'categories': ?categories,
'options': ?options,
'bufferUsageReportingInterval': ?bufferUsageReportingInterval,
'transferMode': ?transferMode,
'streamFormat': ?streamFormat,
'streamCompression': ?streamCompression,
'traceConfig': ?traceConfig,
'perfettoConfig': ?perfettoConfig,
'tracingBackend': ?tracingBackend,
'screenshotMaxSize': ?screenshotMaxSize,
'screenshotMaxCount': ?screenshotMaxCount,
});
}