Repo for storing profiling data
The docs publish workflow is in .github/workflows/publish-astro-docs.yml.
Docs are always built from the Astro project in docs/ and deployed to GitHub Pages from the Actions artifact (no commit/push back to the repository).
- CI uses Node.js 22 for docs dependency/install compatibility.
- Install dependencies:
npm ci(indocs/) - Build docs:
npm run build --if-present(indocs/)
Figures are always generated from profiling data into docs/public/figures before the docs build.
The generation command is automated via:
python scripts/generate_figures.py
It scans every profiling case directory in the repository root — any folder holding a case_metadata.json next to .h5 runs, regardless of test case (diocotron, poisson, …) — and includes every .h5 file automatically.
Pass --pattern to restrict the run to a subset, e.g. --pattern '*-poisson_*'.
Case title and description fields in docs/public/figures/region_statistics.json are injected from each folder's case_metadata.json (with metadata.json accepted for backward compatibility).
Each profiling directory is processed independently, so plots are generated per-case under docs/public/figures/cases/<case-id>/ and are never merged across different folders.
Each run page shows a flame graph.
All run-level figures — durations, gantt, flame and the flame graph — are generated for rank 0 only for now.
scope-profiler pproc --export-profwritesprofile_rank0.prof.- flameprof renders it to
flamegraph_rank0.svg. It is invoked aspython -m flameprofbecause the console script it installs has an unusable shebang. - flameprof emits a fixed 1200px-wide SVG; the generation script rewrites the header to carry a
viewBoxinstead, so the page can scale it to the card width. - The run page inlines the SVG rather than using it as an
<img>source, so the per-frame hover tooltips (percentage, call count, tottime/cumtime) work.
The .prof file is also published, and is downloadable from the run page for use with any pstats viewer.
Each run page also embeds speedscope, which shows every individual call rather than the aggregate the flame graph is built from — so it offers Time Order, Left Heavy and Sandwich views.
scope-profiler pproc --export-speedscopewritesprofile.speedscope.json.- speedscope is a self-contained static web app with no server component.
docs/scripts/copy-speedscope.mjscopies its release build out ofnode_modulesintodocs/public/speedscope/, run automatically from thepredev/prebuildnpm hooks (it has to happen afternpm ci, so the Python figure generation cannot do it). - The run page embeds it in an iframe and points it at the profile with speedscope's
#profileURL=hash parameter.
docs/public/speedscope/ is generated and git-ignored, like docs/public/figures/.
Everything under docs/public/figures/cases/ is wiped and regenerated on each run, so artifacts from cases that no longer exist are not published.