Skip to content

Recover slow perf-callgrind legs; document unified rule (#40) - #47

Open
m-hu wants to merge 1 commit into
masterfrom
fix/40-comparability
Open

m-hu wants to merge 1 commit into
masterfrom
fix/40-comparability

Conversation

@m-hu

@m-hu m-hu commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Part of #40 — the clojure-side comparability work: slow-leg recovery so
no benchmark lacks Ir, with the aggregation rule documented (clojure
already uses Σ-min, unchanged).

Changes

  • New scripts/ci/go/internal/measure/filter.go: comma-list splitting,
    label/stem substring matching, --callgrind-xmx validation.
  • cmd/snip/measure.go + exec.go + report.go: new --exclude,
    --callgrind-xmx (default 2g), --callgrind-include-exempt flags;
    --only uses the same matcher; ToolVersion 5→6.
  • test.yml: main shards exclude the 13 slow (benchmark, runtime) pairs;
    new perf-callgrind-slow job (13 legs, --timeout 3600,
    --jobs 1 for beam_search + dijkstrashortreach, beam_search with
    --callgrind-xmx 8g); report-callgrind merges slow artifacts and
    fails on any remaining callgrind_skipped.

Validation

  • snip measure --self-test: 0 failed (incl. 6 new filter checks);
    go test ./...: 11 pkgs ok; gofmt/go vet/diff-check clean; YAML parses.
  • Each slow --only pattern proven to match exactly its benchmark in the
    real Discover universe; exclude lists script-checked against the
    slow matrix. No benchmark renames (bmf.go diff is comment-only).
  • Full encrypted suite needs CI (no local passphrase).

CI-time impact

Main shards get faster (stop burning ~11 CPU-h of 900s timeouts); slow
legs add parallel jobs bounded per-leg — wall time ≈ slowest slow leg.
Sequencing: land #45 first so trie/edit_distance legs shrink. If any
pre-#45 case exceeds 3600s, CI goes red by design.

AI-Tool: Muse Code (Meta Muse Spark)

The 13 callgrind-slow benchmarks (9 JVM + 4 clojure-rs) each get a
dedicated slow leg with a 3600s/case budget, so they recover without
stalling the fast path:

- snip measure gains --exclude (comma-separated, label/stem match),
  --callgrind-xmx (EpsilonGC heap for the JVM callgrind recipe) and
  --callgrind-include-exempt (run exempt labels instead of skipping);
  --only gains the same comma/label-stem matching (superset of the
  old label-substring behavior; the pilot's --only selects identically).
- perf-callgrind main shards exclude exactly the slow set (verified
  1:1 against the real label/stem universe); each slow leg pins one
  benchmark, reports its Bencher subset, and fails when empty.
- report-callgrind merges slow artifacts too and fails on any
  remaining callgrind skip, so no benchmark stays cross-check-exempt.
- beam_search pairs --callgrind-include-exempt with --callgrind-xmx 8g
  (its allocation exceeds the default 2g EpsilonGC heap).
- Documents the cross-repo comparison rule (sum of per-case MIN Ir);
  benchmark names and the clojure aggregation are unchanged.

AI-Tool: Muse Code (Meta Muse Spark)
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

🐰 Bencher Report

Projectclojure-code-snippet
Branchfix/40-comparability
Commitbba3c27
ReportTestbedAdapterStatus
1ubuntu-latest-clojure-rsJSON✅ No Alerts
2ubuntu-latest-jvmJSON✅ No Alerts
Report 1: 1 benchmark

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Benchmarkcallgrind_allocated_bytesMeasure (units) x 1e9callgrind_instructionsMeasure (units) x 1e9
graph/shortest_path/dijkstrashortreach📈 view plot
⚠️ NO THRESHOLD
60.83 units x 1e9📈 view plot
🚷 view threshold
983.16 units x 1e9
Report 2: 1 benchmark

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Benchmarkcallgrind_allocated_bytesMeasure (units) x 1e9callgrind_instructionsMeasure (units) x 1e12
string_related/automata/count_strings📈 view plot
⚠️ NO THRESHOLD
9.03 units x 1e9📈 view plot
🚷 view threshold
2.45 units x 1e12

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