MetricContext class
The context handed to a MetricCollector at each lifecycle point.
Constructors
-
MetricContext({required String scenarioId, required String scenarioName, required Map<
String, dynamic> config, required Duration elapsed, BenchmarkResult? result, List<Duration> samples = const [], int iteration = 0}) -
Creates a metric context.
const
Properties
-
config
→ Map<
String, dynamic> -
The merged configuration the scenario ran with.
final
- elapsed → Duration
-
Wall-clock time of the scenario's measured section.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- iteration → int
-
Which execution of the scenario this is (0-based, within a suite run).
final
- result → BenchmarkResult?
-
The scenario's result once available;
nullinMetricCollector .beforeBenchmark.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
samples
→ List<
Duration> -
Latency samples measured by the runner, one per executed iteration.
final
- scenarioId → String
-
The scenario being measured.
final
- scenarioName → String
-
Human-readable scenario name.
final
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