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 plus write_benchmark_report_dir. Marker producers can use format_marker on the host or crate::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.

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
BenchmarkRunDirectory
BenchmarkRunMetadata
BenchmarkRunReport
BenchmarkSpan
BenchmarkSpanReport
InvalidBenchmarkSpan
MalformedBenchmarkMarker
RawBenchmarkEvent
UnpairedBenchmarkMarker

Enums§

BenchmarkCounter
Counter whose aggregate cannot be represented.
BenchmarkEventKind
BenchmarkEventSource
SuiteDerivation
UnpairedBenchmarkMarkerKind

Constants§

DEFAULT_PREFIX
Default prefix for benchmark marker lines.

Functions§

aggregate_benchmark_spans
Aggregate spans by named suite and across all suites.
benchmark_run_directory_name
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.
find_latest_previous_run
Find the latest earlier run with readable metadata and a matching command.
format_marker
next_benchmark_run_directory
Compute the next available benchmark run path for one timestamp and commit.
pair_benchmark_spans
parse_benchmark_events
parse_benchmark_events_from_captured_output
Parse separately captured stdout and stderr.
parse_benchmark_events_from_source
read_benchmark_run_metadata
write_benchmark_report_dir
Write one complete benchmark report into the requested directory.