BenchmarkResult class
Structured output of one benchmark scenario execution (FR-004).
Constructors
-
BenchmarkResult({required String scenarioId, required String scenarioName, required String scenarioVersion, required BenchmarkStatus status, required Map<
String, num> metrics, required List<ThresholdViolation> thresholdViolations, required Duration duration, required DateTime timestamp, String gitCommit = 'unknown', Map<String, dynamic> metadata = const {}}) -
Creates a benchmark result.
const
-
BenchmarkResult.fromJson(Map<
String, dynamic> json) -
Deserializes a result from its JSON representation.
factory
Properties
- duration → Duration
-
Wall-clock execution time of the measured section.
final
- gitCommit → String
-
Git commit the benchmark ran against ('unknown' when not a git repo).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
metadata
→ Map<
String, dynamic> -
Additional context (config used, iteration count, isolation info...).
final
-
metrics
→ Map<
String, num> -
All collected metrics (standard + scenario + collector contributed).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scenarioId → String
-
ID of the executed scenario.
final
- scenarioName → String
-
Human-readable scenario name.
final
- scenarioVersion → String
-
Version of the scenario at execution time.
final
- status → BenchmarkStatus
-
Execution outcome.
final
-
thresholdViolations
→ List<
ThresholdViolation> -
Thresholds violated by this run (empty when status is
passed).final - timestamp → DateTime
-
When the benchmark ran.
final
Methods
-
copyWith(
{BenchmarkStatus? status, Map< String, num> ? metrics, List<ThresholdViolation> ? thresholdViolations, Duration? duration, Map<String, dynamic> ? metadata, String? gitCommit}) → BenchmarkResult - Returns a copy with the provided fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Serializes the result to a JSON-compatible map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited