OpsBenchmarkBase class
A base class for running ops benchmarks in Dart.
Constructors
-
OpsBenchmarkBase.new(String name, {required Future<
void> onRun(), String group = 'default', Future<void> onSetup() = _emptySetup, Future<void> onTeardown() = _emptyTeardown}) -
Creates a new instance of OpsBenchmarkBase.
const
Properties
- group → String
-
The group to which the benchmark belongs.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
The name of the benchmark.
final
-
onRun
→ Future<
void> Function() -
A function that will be called to run the benchmark.
final
-
onSetup
→ Future<
void> Function() -
A function that will be called to set up the benchmark before running it.
final
-
onTeardown
→ Future<
void> Function() -
A function that will be called to tear down the benchmark after running it.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
measure(
Duration measureDuration) → Future< BenchmarkResult> - Measures the benchmark for a given duration and returns the result.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
run(
) → Future< void> - Runs the benchmark.
-
toString(
) → String -
A string representation of this object.
inherited
-
warmup(
) → Future< void> - Warms up the benchmark by running it once before measuring.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited