PerformanceCapture class

Captures performance data from the running Flutter app via VM service.

Primary source: Flutter.Frame events on the VM's Extension stream — the stable, documented interface DevTools itself uses (build, raster, elapsed in microseconds per frame). Timeline parsing is kept only as a fallback for engines that don't emit them.

Constructors

PerformanceCapture({required VmService vmService, required String isolateId})

Properties

hashCode int
The hash code for this object.
no setterinherited
isolateId String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
vmService → VmService
final

Methods

captureWindow({required String screenName, int durationMs = 2000}) Future<ScreenPerformance>
Quick snapshot — captures a 2 second window of frames
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startRecording() Future<void>
Start recording — call this before interacting with a screen
stopAndAnalyse(String screenName) Future<ScreenPerformance>
Stop recording and analyse — call this after screen interaction
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

frameBudgetMs double
Per-frame budget in ms. 16.0 (60Hz) unless the device's real refresh rate was detected (see parseDisplayRefreshRate) — set once at startup.
getter/setter pair