getVMTimeline method

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

The getVMTimeline RPC is used to retrieve an object which contains VM timeline events. See Timeline for a detailed description of the response.

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 VmService.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 Callback, an RPCError with error code 114, invalid timeline request, will be returned as timeline events are handled by the embedder in this mode.

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

If getVMTimeline is invoked while the current recorder is File or Perfettofile, an RPCError with error code 114, invalid timeline request, will be returned as timeline events are written directly to a file, and thus cannot be retrieved through the VM Service, in these modes.

Implementation

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