InMemoryMetricExporter class
Metric exporter that buffers exported metric snapshots in memory.
Use with OnDemandMetricReader so tests drive collection
explicitly — tests rarely want a timer fighting their
expect assertions.
- Implemented types
Constructors
- InMemoryMetricExporter()
- Creates an exporter.
Properties
Methods
-
clear(
) → void - Clears the recorded metrics. Call between tests.
-
export(
MetricData data) → Future< bool> -
Export a batch of metrics to the backend.
override
-
findMetricByName(
String name) → Metric? -
Returns the most-recently exported metric named
name, ornullif none match. -
forceFlush(
) → Future< bool> -
Force flush any pending metrics.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
shutdown(
) → Future< bool> -
Shutdown the exporter.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited