BenchmarkBase class

Constructors

BenchmarkBase(String name, {ScoreEmitter emitter = const PrintEmitter()})
const

Properties

emitter ScoreEmitter
final
hashCode int
The hash code for this object.
no setterinherited
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

exercise() → void
Exercises the benchmark. By default invokes run 10 times.
measure() double
Measures the score for the benchmark and returns it.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
report() → void
run() → void
The benchmark code.
setup() → void
Not measured setup code executed prior to the benchmark runs.
teardown() → void
Not measured teardown code executed after the benchmark runs.
toString() String
A string representation of this object.
inherited
warmup() → void
Runs a short version of the benchmark. By default invokes run once.

Operators

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

Static Methods

measureFor(void f(), int minimumMillis) double
Measures the score for this benchmark by executing it repeatedly until time minimum has been reached.