getPerfettoVMTimeline method
The getPerfettoVMTimeline
RPC is used to retrieve an object which
contains a VM timeline trace represented in Perfetto's proto format. See
PerfettoTimeline 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 getPerfettoVMTimeline
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 getPerfettoVMTimeline
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 getPerfettoVMTimeline
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<PerfettoTimeline> getPerfettoVMTimeline(
{int? timeOriginMicros, int? timeExtentMicros}) =>
_call('getPerfettoVMTimeline', {
if (timeOriginMicros != null) 'timeOriginMicros': timeOriginMicros,
if (timeExtentMicros != null) 'timeExtentMicros': timeExtentMicros,
});