Skip to main content

microbench 0.2.0 copy "microbench: ^0.2.0" to clipboard
microbench: ^0.2.0 copied to clipboard

Zero-dependency microbenchmark harness for Dart: robust timing, comparison tables in Markdown, HTML or text, JSON output, and README embedding.

0.2.0 #

  • Breaking Changes: text tables mark noise with (≈ same) and end with warnings; Markdown and HTML cells may end with ≈; Measurement JSON gains sampleMicros; comparisons measure their rows in alternating rounds, so timings shift slightly from 0.1.0.
  • compare and matrix: comparison tables from maps of closures, sync or async.
  • package:microbench/suite.dart: benchmark() and group(), declared like package:test and run automatically.
  • runMain(args, body): --quick, --thorough, --filter, --format, --out, --verify, --save, --baseline and --threshold for any benchmark program, through zone-scoped BenchmarkSettings.
  • Rows of a column are measured in alternating rounds (A B B A); BenchmarkOptions.rounds and BenchmarkOptions.thorough. measureAll measures a list of benchmarks this way.
  • Significance: Measurement keeps its samples (sampleMicros, meanMicros, stdDevMicros, cv); cells whose difference fails a Mann-Whitney U test (mannWhitneyP, runComparison(alpha:)) are marked ≈, also in measureDiff.
  • Warnings below tables for runs under 1 ns and times that do not grow with the input size (Comparison.warnings, showWarnings:).
  • verify: on compare, matrix, runComparison, measureAll and measureDiff checks that rows return equal results (deepEquals), throwing OutputMismatchError.
  • JsonTableRenderer, Comparison.fromJson, parseComparisons, Metric.byName, and BenchmarkDiff with ChangeKind for regression checks.
  • Tables record their environment (detectRuntime(), currentEnvironment()).
  • dart run microbench run compiles and runs benchmarks on jit, aot, js and wasm (runBenchmarks, planRun, findBenchmarks), and dart run microbench diff compares saved results.
  • Guides: getting trustworthy numbers, and migrating from benchmark_harness.
  • Bars no longer fail when a run is faster than the clock resolution, and infinite values format as Infinity.

0.1.0 #

  • Initial release, extracted from the benchmark harness shared by hashlib, cipherlib and convertlib.
  • SyncBenchmark, AsyncBenchmark and SkippedBenchmark, with SyncBenchmark.from and AsyncBenchmark.from for closures.
  • BenchmarkOptions for warmup, duration and batch sizing.
  • Measurement with median, best, worst and median absolute deviation, and JSON support.
  • Metric.throughput, Metric.rate, Metric.runtime and Metric.perSecond.
  • runComparison and Comparison, rendered by MarkdownTableRenderer, HtmlTableRenderer and TextTableRenderer, or serialized with toJson.
  • package:microbench/io.dart: ReportFile, embedFile, compileAndRun and environmentSummary.
  • Executables microbench:embed and microbench:exe.
1
likes
0
points
0
downloads

Publisher

verified publisherbitanon.dev

Weekly Downloads

Zero-dependency microbenchmark harness for Dart: robust timing, comparison tables in Markdown, HTML or text, JSON output, and README embedding.

Repository (GitHub)
View/report issues

Topics

#benchmark #performance #profiling #testing

Funding

Consider supporting this project:

paypal.me

License

unknown (license)

More

Packages that depend on microbench