Skip to main content

Module benchmark

Module benchmark 

Source
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 benchmark::report. Marker producers can use format_marker on the host or ic_testkit::performance::Performance in canister code.

Totals and run counts remain exact integers. Means use IC 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.

Modules§

report
Native benchmark report directories, metadata, CSV and Markdown output.

Structs§

BenchmarkAggregateError
Overflow rejects the complete aggregation, without returning partial totals.
BenchmarkAggregateReport
BenchmarkAggregateRow
BenchmarkAverages
Floor-rounded scaled means of exact aggregate totals and run counts.
BenchmarkComparisonReport
BenchmarkComparisonRow
Current and previous scaled means, preserving missing rows and measured zero.
BenchmarkCounters
BenchmarkParseReport
BenchmarkParserConfig
BenchmarkRunMetadata
BenchmarkRunReport
BenchmarkSpan
BenchmarkSpanReport
InvalidBenchmarkSpan
MalformedBenchmarkMarker
RawBenchmarkEvent
UnpairedBenchmarkMarker

Enums§

BenchmarkCounter
Counter whose aggregate cannot be represented.
BenchmarkEventKind
BenchmarkEventSource
BenchmarkScope
Structural identity of one suite or the cross-suite aggregate.
SuiteDerivation
UnpairedBenchmarkMarkerKind

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. Returns a typed error if either side cannot supply the selected projection.
format_marker
pair_benchmark_spans
parse_benchmark_events
parse_benchmark_events_from_captured_output
Parse separately captured stdout and stderr.
parse_benchmark_events_from_source