package thumper
All checked builds pass sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Micro-benchmarks as regression tests for OCaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
thumper-0.1.0.tbz
sha256=ccf45c4d2bfd6444270c51317e2b83e531d8e4bdc09d5bdb1d0069cd7fe2e43d
sha512=68510d10a959bb89e0a03b48b136f65b31904dfcbc37f2ecd2c8b58f0dd852b6aed5d03fc659c952ca5745762b35ce6042ef147f63360db4270d6da6a20589cc
doc/CHANGES.html
Changes
v0.1.0 2026-11-01
First release.
Thumper benchmarks OCaml code and checks it against a committed baseline. A benchmark is an executable; a dune rule runs it, and a regression beyond a case's budget fails the build. Thumper depends on the unix library alone and is distributed under the ISC license.
- Benchmarks declared with
bench,bench_with_setupandgroup, and a command line fromThumper.runwith the subcommandscheck(the default),blessandlist. - A baseline file per suite, committed with the code, that stores what was measured (sorted samples and exact counts) in one section per machine.
- A default baseline path beside the benchmark's source, which a dune rule and
dune execresolve to the same file through dune's environment, whatever the build directory is called. bless, the one command that writes the baseline: the selected cases' rows, or this machine's whole section, which drops the rows of cases the suite no longer has.checknever writes it.- An
accept:line in the report that names theblesscommand recording the proposed and improved cases, and arerun:line for the failing ones, both pasteable where the command ran, or from the workspace root in a dune rule action. - Budgets per metric, bounding the change from the baseline (
no_slower_than,no_more_alloc_than,relative) or the measured value (at_most). - Sampled evidence compared by rank statistics, where a regression or improvement counts only when a second trial of the case reproduces it.
- A sampled comparison that passes when its interval ends within the budget;
inconclusive: wide intervalmeans the noise exceeds the budget. - Exact allocation counts, compared as integers when a probe proves that a case allocates the same number of words on every call; the probe runs at the baseline's batch size.
- Exact comparisons that ignore the host's load, so an allocation budget can fail the build on a hosted CI runner.
- Each case measured in its own forked process, within a deadline, at the batch size its baseline recorded unless the case's speed has changed enough to recalibrate.
- Sampled comparisons on a loaded host reported as
inconclusive: environmentwith the change this run measured, and--wait-quietto wait for a quiet host. - A per-user measurement lock that keeps two measurements on one host from overlapping.
--jsonfor a JSON document of the verdict,--strictto fail on a metric with no baseline row, and GitHub annotations underGITHUB_ACTIONS.measure, which collects measurements without files,Check.runandVerdict.to_json, which build a check in OCaml, andBaseline.record, which records a measurement in a baseline.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page