OpenQuant Docs banner
OpenQuant icon openquant-rs / documentation terminal

Performance and Benchmarking

Performance is treated as a tracked contract: benchmark suites, baselines, and threshold checks are versioned in-repo.

Benchmark Suites

perf_hotspots

Targets algorithmically heavy paths (including structural-break and bet-sizing hotspots).

synthetic_ticker_pipeline

Measures realistic end-to-end throughput over synthetic market-like time series.

Artifacts

Artifact Role
benchmarks/baseline_benchmarks.json Stable regression baseline committed to git.
benchmarks/latest_benchmarks.json Latest collected run snapshot.
benchmarks/benchmark_manifest.json Benchmark ID allow-list used for deterministic checks.
docs/benchmark_snapshot.md Human-readable benchmark report for releases.

Recommended Protocol

  1. Run benches on a consistent machine profile and avoid concurrent heavy workloads.
  2. Collect JSON output and compare against committed baseline.
  3. Investigate regressions before baseline updates.
  4. Only update baseline when behavior/perf changes are intended.
cargo bench -p openquant --bench perf_hotspots --bench synthetic_ticker_pipeline
python3 scripts/collect_bench_results.py --criterion-dir target/criterion --out benchmarks/latest_benchmarks.json --allow-list benchmarks/benchmark_manifest.json
python3 scripts/check_bench_thresholds.py --baseline benchmarks/baseline_benchmarks.json --latest benchmarks/latest_benchmarks.json --max-regression-pct 25

CI Gate

The workflow .github/workflows/benchmark-regression.yml enforces configured regression thresholds on pull requests and mainline changes.