diff --git a/ci/llgo-size/README.md b/ci/llgo-size/README.md index bed1512..5bfc871 100644 --- a/ci/llgo-size/README.md +++ b/ci/llgo-size/README.md @@ -43,7 +43,9 @@ time use separate commit matrices on the same page; each cell is ranked against the other build modes for the same benchmark and commit, with smaller values receiving the stronger favorable background. Matrix rows are visually grouped by benchmark: the benchmark name appears once at the start of its build modes, -and a full-width separator marks the next benchmark. +and a full-width separator marks the next benchmark. The row set is the union +of every published run, so a historical benchmark remains visible with `—` in +commit columns where it was not produced. The `llgo-main-updated` repository-dispatch event from `xgo-dev/llgo` first updates `LLGO_COMMIT` on the benchmarks `main` branch, then explicitly starts a diff --git a/ci/llgo-size/site/app.js b/ci/llgo-size/site/app.js index f5e9770..d44067f 100644 --- a/ci/llgo-size/site/app.js +++ b/ci/llgo-size/site/app.js @@ -130,6 +130,14 @@ function benchmarkMap(document) { return new Map((document && document.benchmarks || []).map(function (item) { return [item.name, item]; })); } +function benchmarkNamesFromDocuments(documents) { + const names = new Set(); + documents.forEach(function (document) { + (document && document.benchmarks || []).forEach(function (benchmark) { names.add(benchmark.name); }); + }); + return Array.from(names).sort(function (a, b) { return a.localeCompare(b, undefined, { sensitivity: "base" }); }); +} + function parseBuildTimes(text) { const lines = String(text || "").trim().split(/\r?\n/); if (lines.length < 2) return new Map(); @@ -563,8 +571,8 @@ async function main() { if (!response.ok) throw new Error("Cannot load the run index"); state.index = await response.json(); if (!state.index.runs || !state.index.runs.length) throw new Error("No benchmark runs are available"); - const latest = await loadRun(state.index.runs[0]); - state.benchmarkNames = (latest.benchmarks || []).map(function (benchmark) { return benchmark.name; }); + const documents = await Promise.all(state.index.runs.map(loadRun)); + state.benchmarkNames = benchmarkNamesFromDocuments(documents); state.activeBenchmark = state.benchmarkNames[0] || ""; configs.forEach(function (config) { state.activeConfigs.add(config); }); dom.benchmarkSelect.innerHTML = state.benchmarkNames.map(function (name) { return '"; }).join("");