silk.bench.report.
Turns the raw samples of a benchmark run into the report a renderer draws.
When to use#
Call Reports.make on a silk.bench.record.RunResult you read from a result file, to
render a saved run again or with another noise threshold. silk.bench.bench calls it for
every suite it runs.
Details#
A combination of parameters whose programs print result lines gets one table for each name
the lines carry, in the unit of the lines: ns/op when a line has it, or else the first
unit written. The medians of the other units are in the row. Where a larger value is better,
as for req/s, a ratio above 1 has the verdict faster. When the lines of two
implementations carry different checks for one name, the table is marked and no row of it
has a ratio. Every other combination gets one table of process times, as follows.
Each implementation gets one row for each benchmark. The row's statistics cover the measured
runs that exited with status 0: warm-up runs and failed runs are left out, and failed runs
are counted in the row. Every row except the reference's gets its ratio to the reference
with a 95% interval and a verdict, from silk.bench.statistics. A suite with more than one
benchmark also gets the geometric mean of each implementation's ratios.
Import as Reports with import silk.bench.report { Reports }.
Public declarations: 1.
Reports#
pub struct ReportsThe owner type of the report functions. It has no fields and is never constructed.
Implementation Reports#
impl ReportsAssociated function compared#
pub effect fn compared(result: &mut RunResult, earlier: RunResult, label: string) -> bool
! OutOfMemoryError
? &mut AllocatorAdds the implementations of the earlier run earlier to result under the name label,
with their samples for the benchmarks both runs have, and makes the earlier reference the
reference. An earlier run with one implementation adds it as label; one with several
adds each as <label>:<name>. Returns false, and adds nothing, if result already has
an implementation named label.
Errors#
OutOfMemoryError if the Allocator cannot supply the names.
Associated function make#
pub effect fn make(result: &RunResult, noise: f64) -> Report
! OutOfMemoryError
? &mut AllocatorReturns the report of result, with verdicts at the noise threshold noise, a fraction
such as 0.01 for 1%.
Errors#
OutOfMemoryError if the Allocator cannot supply the report.
Category: Benchmarks.
Profiles: aarch64-apple-darwin, aarch64-unknown-linux-gnu, aarch64-unknown-linux-gnu-no-libc, x86_64-unknown-linux-gnu, x86_64-unknown-linux-gnu-no-libc, wasm32-unknown-unknown, wasm32-wasip1, wasm32-wasip2, x86_64-pc-windows-msvc, wasm64-unknown-unknown.