streamTimelineTo static method
- @Since.new('3.11')
- TimelineRecorder recorder, {
- String? path,
- List<
TimelineStream> streams = const [TimelineStream.dart, TimelineStream.gc], - bool enableProfiler = false,
- Duration samplingInterval = const Duration(microseconds: 1000),
Tells runtime to write timeline data using recorder.
Timeline recording is enabled for the whole runtime and not for any specific isolate or isolate group.
Once started timeline recording will continue until it is stopped by stopStreamingTimeline.
Some recorders write into a specific file (specified by path), while
others write to system wide recording buffer.
The streams specifies which timeline streams to enable. Only
TimelineStream.dart and TimelineStream.gc are enabled by default.
If recorder supports profiling data then setting enableProfiler to
true will turn on sampling profiler, which will collect profiling
samples with frequency specified by samplingInterval. These samples
will then written into the timeline.
Throws ArgumentError iff:
pathis specified butrecorderwrites to a fixed location.pathis not specified andrecorderrequires it.enableProfileristrueandrecorderdoes not support writing out profiling data.samplingIntervalis too small.
Implementation
@Since('3.11')
external static void streamTimelineTo(
TimelineRecorder recorder, {
String? path,
List<TimelineStream> streams = const [
TimelineStream.dart,
TimelineStream.gc,
],
bool enableProfiler = false,
Duration samplingInterval = const Duration(microseconds: 1000),
});