Skip to content

mtest 0.8.3

Choose a tag to compare

@github-actions github-actions released this 14 Nov 00:20
b540457
  • Each call measured by itself, as a loop (bench::laps). bench::each takes the call as a
    function; a body that keeps its state in the function it runs in writes the same measurement as
    a loop: bench::laps run{"draw"}; while (run.next()) { ... }. The time from one next to the
    following one is a call's, run is the call's lap (pause, resume, items, part, time,
    value, say, last), and when next returns false the metrics have been reported as each
    reports them; result() is where the calls lay. each is that loop around its function: one
    way of measuring, in two forms.
  • Run alone, a program shows what it measured. A measurement's line in the program's output --
    draw: 2.100 ms (p95 5.300 ms, p99 7.700 ms, max 8.400 ms; mean 2.900 ms; 139 calls; 0 over 8.333 ms), then a line for each part and quantity -- where no runner keeps the run's record.
    Under a runner nothing is added to the case's output: the record has the metrics.
  • What the lap keeps is not the call's. The allocations part, time and value make to keep
    what a call says are left out of the call's count: a frame that allocates nothing reports none
    while it states its parts (lib/tests/allocations.cpp, a program that replaces operator new).
  • A program run alone selects as the runner does. Its arguments name cases by identifier, by
    the name they lie under (suite/group, which was run and then reported as no case), or by a
    pattern with * (the cases it matches, as mcpp test --case takes one); a selection no
    case answers fails the run. The interface said "by prefix" and the program took whole
    identifiers: the statement and the behaviour are now one (lib/tests/alone.cpp).
  • Additive: each measures and reports as it did.