PerformanceMonitor class
Monitors and tracks performance metrics in the app
Properties
-
allMetrics
→ List<
PerformanceMetric> -
List of all performance metrics
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
metrics
→ Stream<
PerformanceMetric> -
Stream of performance metrics
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearMetrics(
) → void - Clear all metrics
-
dispose(
) → void - Dispose the monitor
-
getAverageMetricValue(
String name) → double - Get average value for a specific metric
-
getLatestMetric(
String name) → PerformanceMetric? - Get the latest metric for a specific name
-
getMetricsByName(
String name) → List< PerformanceMetric> - Get metrics by name
-
getMetricsByTag(
String tagKey, String tagValue) → List< PerformanceMetric> - Get metrics by tag
-
measureExecutionTime<
T> (Future< T> function(), {String? name, Map<String, String> ? tags}) → Future<T> - Record execution time of a function
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
recordFrameRate(
{double fps = 60.0, String? description, Map< String, String> ? tags}) → void - Record frame rate
-
recordMemoryUsage(
{String? description, Map< String, String> ? tags}) → void - Record memory usage
-
recordMetric(
{required String name, required double value, required String unit, String? description, Map< String, String> ? tags}) → void - Record a performance metric
-
setMaxMetrics(
int maxMetrics) → void - Set the maximum number of metrics to keep
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → PerformanceMonitor
-
no setter