PerformanceTracker class

Measures wall-clock duration of arbitrary operations.

Constructors

PerformanceTracker()

Properties

completedCount int
Number of completed (but not yet drained) metrics.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasRunning bool
Whether any operations are currently being tracked.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

drain() List<PerformanceMetric>
Retrieve all completed metrics and clear the internal list.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start(String operationId, {Map<String, dynamic>? metadata}) → void
Start tracking an operation identified by operationId.
stop(String operationId, {Map<String, dynamic>? extraMetadata}) Duration?
Stop tracking and return the elapsed duration. Returns null if operationId was not being tracked.
toString() String
A string representation of this object.
inherited

Operators

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