Raxol.Bench.Dashboard (Raxol v2.6.1)

View Source

Result persistence, regression detection, comparison, and HTML dashboard for mix raxol.bench.

Works on scalar metrics extracted from Benchee suites (median / average / p99 per job, in nanoseconds). Every comprehensive run snapshots its metrics to bench/output/enhanced/json/metrics_<timestamp>.json; --regression compares against a pinned baseline.json, --compare against the previous snapshot.

Summary

Functions

Compare this run's job medians against bench/output/enhanced/baseline.json and raise if any job regressed more than 5%. With no baseline on disk, saves one and succeeds.

Extract Jason-safe scalar metrics from a map of Benchee suites.

Generate the HTML dashboard from measured metrics.

Loads and parses a JSON file, returning the decoded map or nil.

Load the most recent metrics snapshot, or nil if none exist.

Print the measured per-job medians and p99s. No fixed verdicts.

Diff this run's metrics against the most recent PREVIOUS snapshot and print per-job deltas. Prints every job that moved more than 1% either way.

Write this run's extracted metrics snapshot; returns the metrics.

Functions

check_for_regressions(results)

Compare this run's job medians against bench/output/enhanced/baseline.json and raise if any job regressed more than 5%. With no baseline on disk, saves one and succeeds.

extract_metrics(results)

Extract Jason-safe scalar metrics from a map of Benchee suites.

Returns %{"suite" => %{"job" => %{"median" | "average" | "p99" => ns}}}. Accepts already-extracted metrics unchanged, so callers can pass either.

generate_enhanced_dashboard(results, timestamp)

Generate the HTML dashboard from measured metrics.

load_and_parse_json_file(file_path)

Loads and parses a JSON file, returning the decoded map or nil.

load_latest_results()

Load the most recent metrics snapshot, or nil if none exist.

run_comparison_analysis(results, timestamp)

Diff this run's metrics against the most recent PREVIOUS snapshot and print per-job deltas. Prints every job that moved more than 1% either way.

snapshot_metrics(results, timestamp)

Write this run's extracted metrics snapshot; returns the metrics.