start method

Future<void> start({
  1. @Deprecated('This parameter is deprecated') String? categories,
  2. @Deprecated('This parameter is deprecated') String? options,
  3. num? bufferUsageReportingInterval,
  4. @Enum(['ReportEvents', 'ReturnAsStream']) String? transferMode,
  5. StreamFormat? streamFormat,
  6. StreamCompression? streamCompression,
  7. TraceConfig? traceConfig,
  8. String? perfettoConfig,
  9. TracingBackend? tracingBackend,
})

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)

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}) async {
  assert(transferMode == null ||
      const ['ReportEvents', 'ReturnAsStream'].contains(transferMode));
  await _client.send('Tracing.start', {
    if (categories != null) 'categories': categories,
    if (options != null) 'options': options,
    if (bufferUsageReportingInterval != null)
      'bufferUsageReportingInterval': bufferUsageReportingInterval,
    if (transferMode != null) 'transferMode': transferMode,
    if (streamFormat != null) 'streamFormat': streamFormat,
    if (streamCompression != null) 'streamCompression': streamCompression,
    if (traceConfig != null) 'traceConfig': traceConfig,
    if (perfettoConfig != null) 'perfettoConfig': perfettoConfig,
    if (tracingBackend != null) 'tracingBackend': tracingBackend,
  });
}