Repository navigation
HF-150: advisory instruction-count workflow (prototype) - #1814
marcin-kordas-hoc wants to merge 11 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… script Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
hyperformula-docs | d0ac897 | Commit Preview URL Branch Preview URL |
Nov 04 2026, 10:44 AM |
Performance comparison of head (d0ac897) vs base (b3f2f68) with the tests at 6d7003d
Threshold of an unmarked scenario = max(5%, 3 x the standard error of the difference of the two medians). † = the band of changes observed on identical code in earlier runs, instead of that rule. ‡ = a fixed threshold for a scenario that guards against a change of complexity class. This check is advisory: it reports regressions but does not fail the build.
|
| # The runner comes with the shared tests and is started through the generic tsnode script of the engine's | ||
| # package.json, which every revision has. Each run compiles the engine of its own tree into the same build directory and measures it | ||
| # there, so the two runs must stay sequential: the count depends on the paths a process sees. | ||
| - name: (base) Count instructions | ||
| run: cd base && npm run tsnode --workspace=hyperformula test/hyperformula-tests/performance/run-instructions.ts "$GITHUB_WORKSPACE/base-instructions.json" | ||
|
|
||
| - name: (head) Count instructions | ||
| run: cd head && npm run tsnode --workspace=hyperformula test/hyperformula-tests/performance/run-instructions.ts "$GITHUB_WORKSPACE/head-instructions.json" |
There was a problem hiding this comment.
Nothing checks that performance/run-instructions.ts exists in the paired tests branch. A tests branch cut before hyperformula-tests#91, or created from a develop that doesn't have the runner yet, makes this step stop with a ts-node module-not-found error and leaves the summary empty. If this PR merges before #91, every PR gets that failing job.
Could we guard it the way performance.yml guards noise-history.json, and skip with a visible notice? Add this step before the count steps:
- name: Check for the instruction-count runner
id: runner
run: |
if [ -f head/hyperformula/test/hyperformula-tests/performance/run-instructions.ts ]; then
echo "present=true" >> "$GITHUB_OUTPUT"
else
echo "::notice::The paired hyperformula-tests branch predates the instruction-count runner; skipping."
fiThen add if: steps.runner.outputs.present == 'true' to the two count steps and to "Compare the counts".
A paired hyperformula-tests branch without performance/run-instructions.ts made the count steps stop with a module-not-found error. The job now checks for the runner and, when it is missing, skips the counts and the comparison with a notice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/hf-150-perf-gate #1814 +/- ##
========================================================
Coverage ? 97.36%
========================================================
Files ? 209
Lines ? 16524
Branches ? 3670
========================================================
Hits ? 16089
Misses ? 427
Partials ? 8 🚀 New features to boost your workflow:
|
Context
The PR adds an advisory workflow that compares base and head by the CPU instructions each performance scenario executes, instead of by time.
.github/workflows/performance-instructions.yml: installs valgrind, counts the instructions of every scenario for base and head (one after the other, from the same build directory), writes the comparison to the job summary and prints the raw counts into the log. Paths follow the monorepo layout.continue-on-error) and posts no comment.performance.ymlis unchanged.performance/run-instructions.ts, the job skips the counts and the comparison with a notice instead of failing with module-not-found.hyperformula/dev-docs/PERFORMANCE.md: one sentence about this workflow.How did you test your changes?
feat/hf-150-instruction-countinhyperformula-tests.setCellContentsmoved every scenario that calls it by +0.06% to +3.97%, and every other scenario by at most 0.013%.developandfeat/hf-150-perf-gate(no runner) print the notice and set no output, so the three guarded steps skip;feat/hf-150-instruction-countsetspresent=true.Compatibility with Excel and Google Sheets
Not applicable.
Public API changes
None.
Out of scope and follow-ups
Types of changes
CI tooling only, plus one sentence in
dev-docs/.Related issues
Checklist
dev-docs/pages this change affects – or none needed it.🤖 Generated with Claude Code
Note
Low Risk
CI and dev-docs only; no engine or API changes, and the job cannot fail the pull request.
Overview
Adds a prototype GitHub Actions workflow Performance (instruction count) that runs on pull requests alongside the existing wall-clock performance job.
The new job checks out base and head, syncs the shared
hyperformula-testssuite to both trees, and uses valgrind/callgrind to count CPU instructions for each performance scenario on each revision (sequentially, on the same Node 22 build). It writes a base-vs-head comparison to the job summary and logs raw JSON counts. The job is advisory only:continue-on-error: true, no PR comment, and no change toperformance.yml.If the paired tests branch lacks
performance/run-instructions.ts, guarded steps are skipped with a notice instead of failing.hyperformula/dev-docs/PERFORMANCE.mdgains one sentence documenting this workflow and its prototype status.Reviewed by Cursor Bugbot for commit 2f13c8b. Bugbot is set up for automated code reviews on this repo. Configure here.