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