FrameTimeStats class

A percentile summary of a batch of frame-time samples.

Deliberately has no mean. A mean of 8ms can hide a p99 that drops a frame every hundred, and a mean dragged up by one real stutter can hide an otherwise-smooth p50 -- either way the average answers a question nobody asked. Percentiles, plus the true worst, are what a jank budget actually needs: p50 for the typical frame, p90 and p99 for how bad the tail gets, and worst for the single frame a user might have actually seen drop.

Annotations

Constructors

FrameTimeStats.of(List<Duration> samples)
Computes percentiles over samples.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
p50 → Duration
The median frame.
final
p90 → Duration
The frame at the 90th percentile -- one in ten frames is at least this slow.
final
p99 → Duration
The frame at the 99th percentile -- one in a hundred frames is at least this slow.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sampleCount → int
How many samples this summary was computed from.
final
worst → Duration
The single slowest frame in the batch.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
This summary as milliseconds, for reports and JSON.
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited