benchmark_runner library

Classes

AsyncBenchmark
A class used to benchmark asynchronous functions. The benchmarked function is provided as a constructor argument.
Benchmark
A class used to benchmark synchronous functions. The benchmarked function is provided as a constructor argument.
Group
Stats<T extends num>
Provides access to basic statistical entities of a numerical random sample.

Enums

ExitCode
Predefined benchmark process exit codes.

Extensions

BenchmarkHelper on Stopwatch
BenchmarkProcess on Process
Extension on Process. Adds the static method runBenchmark.
BenchmarkUtils on BenchmarkProcessResult
ColorProfile on Ansi
Defines styles and colors used to print benchmark reports to a terminal.
DurationFormatter on Duration
GroupDescription on String
Histogram on Stats<num>
Precision on double
Enables printing doubles with a given number of non-zero fractional digits.
StringBlock on String

Constants

groupErrorMark → const String
hourGlass → const String
ln10 → const double
successMark → const String

Functions

addSuccessMark([String mark = successMark]) → void
Writes a mark to stderr. Is used by BenchmarkProcessResult to count successfully finished benchmarks.
asyncBenchmark(String description, Future<void> run(), {Future<void> setup()?, Future<void> teardown()?, bool emitStats = true, bool runInIsolate = true}) Future<void>
Defines an asynchronous benchmark.
benchmark(String description, void run(), {void setup()?, void teardown()?, bool emitStats = true}) → void
Defines a benchmark for the synchronous function run. The benchmark scores are emitted to stdout.
doNothing() → void
A synchronous function that does nothing.
futureDoNothing() Future<void>
An asynchronous function that does nothing.
group(String description, FutureOr<void> body()) FutureOr<void>
Defines a benchmark group.
reportError(dynamic error, StackTrace stack, {required String description, required Duration runtime, required String errorMark}) → void
Reports an error and adds an error mark
resolveBenchmarkFiles(String path) Future<List<File>>
Returns a list of resolved benchmark files.

Typedefs

AsyncFunction = Future<void> Function()
BenchmarkProcessResult = ({List<String> arguments, String executable, ProcessResult processResult})
A record holding:
ExitStatus = ({ExitCode exitCode, String message})
A record holding:
SampleSizeEstimator = ({int inner, int outer}) Function(int clockTicks)