getVMTimeline method Null safety

  1. @override
Future<Timeline> getVMTimeline(
  1. {int? timeOriginMicros,
  2. int? timeExtentMicros}
)
override

The getVMTimeline RPC is used to retrieve an object which contains VM timeline events.

The timeOriginMicros parameter is the beginning of the time range used to filter timeline events. It uses the same monotonic clock as dart:developer's Timeline.now and the VM embedding API's Dart_TimelineGetMicros. See getVMTimelineMicros for access to this clock through the service protocol.

The timeExtentMicros parameter specifies how large the time range used to filter timeline events should be.

For example, given timeOriginMicros and timeExtentMicros, only timeline events from the following time range will be returned: (timeOriginMicros, timeOriginMicros + timeExtentMicros).

If getVMTimeline is invoked while the current recorder is one of Fuchsia or Macos or Systrace, an RPC error with error code 114, invalid timeline request, will be returned as timeline events are handled by the OS in these modes.

Implementation

@override
Future<Timeline> getVMTimeline(
        {int? timeOriginMicros, int? timeExtentMicros}) =>
    _call('getVMTimeline', {
      if (timeOriginMicros != null) 'timeOriginMicros': timeOriginMicros,
      if (timeExtentMicros != null) 'timeExtentMicros': timeExtentMicros,
    });