Skip to content

Name an arm64 CPU in the ML-DSA-87 bench, and print no p99.9 it cannot resolve - #20

Merged
HackTuah merged 1 commit into
mainfrom
tools/bench-report
Oct 20, 2026
Merged

HackTuah merged 1 commit into
mainfrom
tools/bench-report

Conversation

@HackTuah

Copy link
Copy Markdown
Member

Tooling and one CI argument. Nothing in lib/ or the Hex package changes.

Why. The ML-DSA-87 bench's first CI run on the box leg printed two things that were not what they said:

  • machine: unknown (CPU part 0xd49). arm64 Linux gives no model name in /proc/cpuinfo, only the implementer and part numbers, and the script fell back to "unknown".
  • At 500 rounds the p99.9 index is the last sample, so every p99.9 printed equalled max.

What changes

  • tools/bench_mldsa.exs: with no model name, the label prints the implementer and part numbers (CPU implementer 0x41, CPU part 0xd49). A percentile is printed only when a sample lies above its index, and - otherwise.
  • ci.yml: the box leg's bench runs 2,000 rounds per size (the script's default), so its p99.9 is a percentile.

Evidence

  • The label logic, run over an arm64 cpuinfo sample with GitHub's runner fields, prints CPU implementer 0x41, CPU part 0xd49; over this x86_64 machine, the model name as before.
  • mix run tools/bench_mldsa.exs 500 (OTP 28.5.0.8 over OpenSSL 3.5.9): every p99.9 prints -, exit 0. At 2,000 rounds every p99.9 lies below its max, exit 0.
  • mix format --check-formatted, mix compile --warnings-as-errors, mix credo --strict: exit 0.

Not yet measured

  • The new label and the 2,000-round figures on the arm64 runner; this run's box leg is the first.

…t resolve

The bench's first CI run on the box leg printed two things that were
not what they said:

- "machine: unknown (CPU part 0xd49)". arm64 Linux gives no model
  name in /proc/cpuinfo, only the implementer and part numbers, and
  the script fell back to "unknown". It now prints those numbers
  ("CPU implementer 0x41, CPU part 0xd49").
- At 500 rounds the p99.9 index is the last sample, so every p99.9
  equalled max. A percentile is now printed only when a sample lies
  above it, and "-" otherwise; the box leg runs 2,000 rounds per size,
  the script's default, so its p99.9 is one.

No figure changes meaning, and nothing in lib/ changes.

Signed-off-by: Ayla Croft <aylacroft@proton.me>
@HackTuah
HackTuah merged commit eef65b8 into main Oct 20, 2026
11 checks passed
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.

1 participant