FrameTiming class
Time-related performance metrics of a frame.
If you're using the whole Flutter framework, please use
SchedulerBinding.addTimingsCallback
to get this. It's preferred over using
Window.onReportTimings directly because
SchedulerBinding.addTimingsCallback
allows multiple callbacks. If
SchedulerBinding
is unavailable, then see Window.onReportTimings for how
to get this.
The metrics in debug mode (flutter run
without any flags) may be very
different from those in profile and release modes due to the debug overhead.
Therefore it's recommended to only monitor and analyze performance metrics
in profile and release modes.
Constructors
-
FrameTiming(List<
int> timestamps) - Construct FrameTiming with raw timestamps in microseconds. [...]
Properties
- buildDuration → Duration
-
The duration to build the frame on the UI thread. [...]
read-only
- rasterDuration → Duration
-
The duration to rasterize the frame on the raster thread. [...]
read-only
- totalSpan → Duration
-
The timespan between build start and raster finish. [...]
read-only
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
timestampInMicroseconds(
FramePhase phase) → int - This is a raw timestamp in microseconds from some epoch. The epoch in all FrameTiming is the same, but it may not match DateTime's epoch.
-
toString(
) → String -
Returns a string representation of this object.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited