Benchmark class abstract
A named piece of code to measure.
Extend SyncBenchmark or AsyncBenchmark, or wrap a closure with SyncBenchmark.from or AsyncBenchmark.from. Use SkippedBenchmark to keep a row in a comparison without measuring it.
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
The label shown in reports, such as a library or variant name.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → int
-
Units processed per run: bytes for Metric.throughput, or any unit
with Metric.perSecond. Leave it 0 when only time or rate matter.
final
Methods
-
measure(
[BenchmarkOptions options = BenchmarkOptions.standard]) → Future< Measurement> -
Measures this benchmark with
options. -
measureDiff(
List< Benchmark> others, {BenchmarkOptions options = BenchmarkOptions.standard, Metric? metric, bool verify = false, double alpha = 0.05, void log(String line) = print}) → Future<List< Measurement> > -
Measures this benchmark together with
others(see measureAll), and prints one line per benchmark comparing it with this one. -
measureRate(
{BenchmarkOptions options = BenchmarkOptions.standard, Metric? metric, void log(String line) = print}) → Future< Measurement> -
Measures this benchmark and prints one line with the result, like
benchmark_harness'sreport(). -
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