Skip to content

Keep the benchmark's numbers after the job that produced them (#500) - #962

Open
Rafael-SOWNet wants to merge 1 commit into
masterfrom
feat/benchmark-results-retained
Open

Keep the benchmark's numbers after the job that produced them (#500)#962
Rafael-SOWNet wants to merge 1 commit into
masterfrom
feat/benchmark-results-retained

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Collaborator

Step 1 of #500, and the only step that can be taken from inside this repository.

The Kernel Benchmark workflow ran a CPU benchmark and a RAM benchmark and then threw both away. The numbers existed only in the job log, which expires — so there was no way to see whether a figure had moved without checking out an old commit and re-running it by hand.

Two changes:

  • RAMUsageTest now exports a CSV. It carried [MemoryDiagnoser] but no exporter, so unlike CommonFunctionsInterVersion it wrote to the console only. Half of every run was unrecoverable by construction.
  • The workflow uploads both benchmarks' artifacts, with if: always() — a run that fell over part way still produced numbers for the cases that completed, and those are the interesting ones when something has just broken.

Verified by running it, not by reading the attribute

BenchmarkDotNet's ArtifactsPath names a directory, not a file, despite [ArtifactsPath("./benchmark_results.csv")] reading like a filename. Running the benchmark confirms where the output actually lands:

benchmark_results.csv/results/DotnetBenchmark.RAMUsageTest-report.csv
benchmark_results.csv/results/DotnetBenchmark.RAMUsageTest-report-github.md
benchmark_results.csv/results/DotnetBenchmark.RAMUsageTest-report.html

which is what the upload glob matches. Worth checking rather than assuming: a path that matches nothing uploads nothing and the job still goes green, which looks exactly like success. if-no-files-found: warn is there for the same reason.

The directory is already in .gitignore, so nothing generated is committable.

What this does not do, and why

The issue's plan pushes result.csv to AngouriMathLab/performance-reports and builds diagrams in AngouriMathLab/performance-reports-tools, then publishes to the site. Neither repository exists — I checked both. So the remaining steps need either those repositories created, or a different destination decided, and that is a call rather than an implementation.

What this gets you meanwhile: 90 days of downloadable, comparable CSVs per commit, which is enough to answer "did this PR move the number" without re-running anything.

🤖 Generated with Claude Code

The Kernel Benchmark workflow ran a CPU and a RAM benchmark and then threw both away:
the numbers existed only in the job log, which expires, so there was no way to see
whether a figure had moved without checking out an old commit and re-running it.

Two changes, and between them the results survive:

- RAMUsageTest now exports a CSV. It carried [MemoryDiagnoser] but no exporter, so
  unlike CommonFunctionsInterVersion it wrote to the console only.
- The workflow uploads both benchmarks' artifacts, with if: always() so a run that
  fell over part way still keeps the cases that completed -- which are the interesting
  ones when something has just broken.

Verified by running rather than by reading the attribute: BenchmarkDotNet's
ArtifactsPath names a *directory*, so the output lands in
benchmark_results.csv/results/DotnetBenchmark.RAMUsageTest-report.csv, and that is
what the upload glob matches. The directory is already gitignored.

**This is step 1 of the issue and the only step that can be taken here.** The plan it
describes pushes reports to AngouriMathLab/performance-reports and builds diagrams in
AngouriMathLab/performance-reports-tools; neither repository exists. So the rest wants
either those repositories created or a different destination decided, and that is a
call rather than an implementation.
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