Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Overview
The following is meant to elucidate the current state of the historical plotting workflow for the benefit of reviewers and myself. It should evolve into inline or hosted documentation at some point.
Historical plot data
The core file structure is a
benchmarks/history
directory on thegh-pages
branch that contains:.tar.gz
archives, one for each commit or workflow run, which contain the Criterion benchmark results andCargo.lock
for the given commit.plot-data.json
, which contains only the relevant metadata and average benchmark result for each of the. This file is persistent and append-only, and if it's not found then it is re-created using each of the historical.tar.gz
results..png
plot images, created on each run usingplot-data.json
This is all created/deployed by the workflow after running the benchmarks, with the only prerequisite being an existing
gh-pages
branch deployed via GitHub Pages. See https://github.com/lurk-lab/ci-lab/tree/gh-pages and theSuccessful run
below as an exampleBenchmark data format
This workflow expects a specific Criterion Benchmark ID format in order to parse and plot data correctly. The schema used by Criterion is as follows:
This ID is then printed to stdout and stored in the resulting benchmark JSON, along with the bench results and other statistics.
For the purpose of
gh-pages
benchmarks,bench_params
must be equivalent to<commit_hash>-<commit_timestamp>-<params>
, so it will look like the following example in Lurk:When plotting, we split the data into the following groups:
bench_group
/bench_name
pair, e.g.Fibonacci-num=10-Prove
(x, y)
coordinate is a pair of(commit_timestamp, bench_result)
, optionally labeled with thecommit_hash
(x, y)
coordinates is grouped bybench_params
, e.g. one line each forrc=100
,rc=200
A test plot can be viewed at https://lurk-lab.github.io/ci-lab/benchmarks/history/plots.html, though the data is still a WIP.
Next steps
lurk-rs
andarecibo
once merged. This will require formattinggh-pages
benchmarks properly using the<LURK|ARECIBO>_BENCH_OUTPUT
env var and the new schema shown above. Also, this PR breaks plotting compatibility with old benchmarks so they will have to be manually moved to another directory (e.g.benchmarks/history/deprecated
)gh-pages
andcommit-comment
(seebench-deploy
: Convert between Criterion JSON formats #52).png
to.svg
to enable zooming in/outSuccessful run
https://github.com/lurk-lab/ci-lab/actions/runs/8074420081/job/22060261452
https://lurk-lab.github.io/ci-lab/benchmarks/history/plots.html