PerformanceMonitor class
Monitors device performance metrics like CPU usage, memory pressure, frame processing time, and battery consumption.
The monitor uses a combination of platform-specific implementations and internal measurements to track performance, and can be used to make adaptive quality decisions.
- Implemented types
Properties
- currentMetrics → PerformanceMetrics
-
Get the current performance metrics
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addFrameTime(
double milliseconds) → void - Add a frame processing time measurement
-
addListener(
PerformanceMetricsCallback listener) → void - Add a listener for metrics updates
-
dispose(
) → Future< void> -
Releases resources held by this object
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeListener(
PerformanceMetricsCallback listener) → void - Remove a listener for metrics updates
-
startMonitoring(
{Duration? updateInterval}) → void - Start monitoring performance metrics
-
stopMonitoring(
) → void - Stop monitoring performance metrics
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → PerformanceMonitor
-
Get the singleton instance
no setter