Expand description
Parse, pair, aggregate, compare, and report compact benchmark markers.
The normal pipeline is parse_benchmark_events,
pair_benchmark_spans, aggregate_benchmark_spans, and optionally
compare_benchmark_aggregates. Native report output lives in
the repository’s benchmark_report example. Marker
producers can use format_marker on the host or
ic_testkit::performance in canister code.
Totals and run counts remain exact integers. Means use Metrics’ exact scaled integer projection, rounded down. Callers choose the scale and handle projection errors; reports use scale one in the original counter units. Comparisons retain current and previous means instead of percentage estimates.
Structs§
- Benchmark
Aggregate Error - Overflow rejects the complete aggregation, without returning partial totals.
- Benchmark
Aggregate Row - Exact totals and extrema for one scope and span label.
- Benchmark
Averages - Floor-rounded scaled means of exact aggregate totals and run counts.
- Benchmark
Comparison Row - Current and previous measurements, preserving missing rows and measured zero.
- Benchmark
Counters - Exact instruction and byte counters reported by a marker.
- Benchmark
Measurement - Run count and scaled means for one present comparison side.
- Benchmark
Parse Report - Parsed events, rejected markers and ignored log noise.
- Benchmark
Parser Config - Marker prefixes, suite naming and noise handling selected by the caller.
- Benchmark
Span - Matched start/end markers with nonnegative counter differences.
- Benchmark
Span Report - Pairing result retaining unmatched and invalid markers.
- Invalid
Benchmark Span - Matched markers whose counters decreased.
- Malformed
Benchmark Marker - Rejected marker and its parse diagnostic.
- RawBenchmark
Event - Parsed marker with its original stream and line provenance.
Enums§
- Benchmark
Average Error - Why a benchmark’s scaled average cannot be represented.
- Benchmark
Comparison Error - A comparison refuses ambiguous row identities or unrepresentable means.
- Benchmark
Counter - Counter whose aggregate cannot be represented.
- Benchmark
Event Kind - Whether a marker opens or closes a measured span.
- Benchmark
Event Source - Stream from which a marker was collected.
- Benchmark
Marker Error - A marker field cannot be represented in the line-oriented marker grammar.
- Benchmark
Scope - Structural identity of one suite or the cross-suite aggregate.
- Suite
Derivation - How a marker label determines its suite.
Constants§
- DEFAULT_
PREFIX - Default prefix for benchmark marker lines.
Functions§
- aggregate_
benchmark_ spans - Aggregate spans by named suite and across all suites.
- compare_
benchmark_ aggregates - Pair current and previous means at the same caller-selected scale.
- format_
marker - Format one marker using the supplied prefix, label and counters.
- pair_
benchmark_ spans - Pair markers by suite and label, using the most recent unmatched start.
- pair_
benchmark_ spans_ by_ origin - Pair only markers with the same prefix, stream, suite and span label.
- parse_
benchmark_ events - Parse markers without assigning a stream identity.
- parse_
benchmark_ events_ from_ captured_ output - Parse separately captured stdout and stderr.
- parse_
benchmark_ events_ from_ source - Parse markers while retaining the supplied stream identity.
- try_
format_ marker - Format one complete marker after admitting its prefix and start/end label.