Skip to content

add throughput reporting, warmup, stats, and CSV export to exp_hash#626

Open
alekseevpavel04 wants to merge 1 commit intosigstore:mainfrom
alekseevpavel04:add-throughput-reporting-warmup-stats-and-csv-expo
Open

add throughput reporting, warmup, stats, and CSV export to exp_hash#626
alekseevpavel04 wants to merge 1 commit intosigstore:mainfrom
alekseevpavel04:add-throughput-reporting-warmup-stats-and-csv-expo

Conversation

@alekseevpavel04
Copy link
Copy Markdown

Summary

The hash benchmark only reported min time per run, making it hard to compare algorithms by actual throughput or spot variance across runs. Added throughput (MB/s) to the default output, a --stats flag for mean/stdev columns, a --warmup arg to discard cold-cache runs before timing, and --output to dump a CSV for further analysis.

All timing logic is now in _run_benchmark(), which also fixes a shadowing bug where the inner closure was named hash, overriding the builtin. A _print_summary() table at the end shows peak throughput per algorithm across all sizes, which is the number most people actually care about.

Run with --stats --output results.csv to get the full picture. Default behavior (just min time + throughput column) is backward compatible.

Checklist
  • All commits are signed-off, using DCO
  • All new code has docstrings and type annotations
  • All new code is covered by tests. Aim for at least 90% coverage. CI is configured to highlight lines not covered by tests.
  • Public facing changes are paired with documentation changes
  • Release note has been added to CHANGELOG.md if needed

@alekseevpavel04 alekseevpavel04 requested review from a team as code owners March 31, 2026 08:40
@mihaimaruseac
Copy link
Copy Markdown
Member

You need to do the DCO for the commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants