ProgramDiagnosticsMetrics class abstract final

Shared registry for metrics contributed by applications and frameworks.

Properties

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

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

changes → Stream<Map<String, String>>
Emits a snapshot whenever custom metrics change.
no setter
values → Map<String, String>
Current custom metrics.
no setter

Static Methods

clear() → void
Removes all custom metrics.
removeMetric(String key) → void
Removes one metric.
setMetric(String key, Object? value) → void
Adds or updates one metric.
setMetrics(Map<String, Object?> values, {bool replace = false}) → void
Adds or updates multiple metrics.