Expand description
tak.toml — declared benchmarks.
Named after the tool rather than after its current contents. It already
holds more than a command list in spirit, and gates, runner classes and
competitor definitions all belong here too; bench.toml would be misnamed
the moment the first of those lands.
The point of declaring benchmarks is that CI and a laptop run the same thing. A command line in a workflow file drifts from the one people use locally, and the numbers stop being comparable without anyone noticing.
Structs§
- Auto
Runs - The limits
runs = "auto"works within. Resolved for every subject, sotak run --runs autocan switch a fixed benchmark over without the file having to declare them. - Bench
- Config
- Subject
- A subject with every default applied, ready to measure.
- Subject
Decl - One program in a multi-subject benchmark, as written in
tak.toml.
Enums§
- Runs
- How many timed runs a subject gets.
- Runs
Decl runsas written: a count, or a word. Only"auto"is a valid word, checked when the subject is resolved so the error names it.
Constants§
- DEFAULT_
BUDGET runs = "auto"defaults: about this much wall time per subject, prepare included, and never fewer or more runs than these. The floor keeps a slow competitor’s result from resting on one or two samples; the ceiling stops a millisecond-scale subject from spending the whole budget on runs that stopped adding information long before.- DEFAULT_
MAX_ RUNS - DEFAULT_
MIN_ RUNS - DEFAULT_
RUNS - Defaults chosen to match
tak run’s, so moving a command intotak.tomldoes not silently change what it measures. - DEFAULT_
WARMUP - FILE_
NAME - SELF_
TOOL - The name a single-command benchmark records under.
comparerenders this tool as the bare benchmark name.
Functions§
- parse_
duration - Parse
500ms,30s,2mor1h; a bare number is seconds.