GoldenStore class

The benchmarks.json store: reads recorded goldens, checks measured samples against them (regression gate) and records new ones.

Constructors

GoldenStore({String path = goldensPath})

Properties

hashCode int
The hash code for this object.
no setterinherited
path String
Path to the store file (default: benchmarks.json next to the runner).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

check(Map<String, num> measured, {required String ref, double slack = 0.3}) List<MetricCheck>
Checks measured medians against the recorded goldens of ref: every metric is "lower is better", so the gate is one-sided — measured worse than the golden by more than the slack fails, measured better always passes. Missing goldens (a check before any record) print a warning and do not fail — the first recording on a reference establishes them.
load(String metric, {List<String> preferRefs = const ['android', 'any'], bool fallbackAny = true}) num?
Recorded golden for metric, preferring the references in preferRefs (default: android, then any), then — when fallbackAny — the first recorded value. Null when the file is missing, corrupt, or has no entry. Head-to-head refs (android-scv, android-tcm) plug in via preferRefs.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
record(Map<String, num> measured, {required String ref}) → void
Records measured medians as goldens for ref and writes the store when anything changed. Prints one recorded line per metric and a final wrote line — the CLI log the CI publishes.
toString() String
A string representation of this object.
inherited

Operators

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