Skip to content

Commit

Permalink
doc: improve presentation of benchmark graphs by extracting release v…
Browse files Browse the repository at this point in the history
…ersion if found
  • Loading branch information
EagleoutIce committed Sep 21, 2023
1 parent 34d9a7d commit 87ee8e2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion wiki/stats/benchmark/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,15 @@
}));
}

const releaseRegex = /.*Release v(\d+\.\d+\.\d+)/;
function getReleaseVersion(commit) {
const match = releaseRegex.exec(commit.message);
if (match) {
return match[1];
}
return commit.message.slice(0, 12);
}

function renderAllChars(dataSets) {

function renderGraph(parent, name, dataset, i) {
Expand All @@ -176,7 +185,8 @@

const color = cycleColors[i % cycleColors.length];
const data = {
labels: dataset.map(d => `${d.commit.message.slice(0,12)} (${d.commit.id.slice(0, 7)})`),
// [skip ci] Release v1.1.3
labels: dataset.map(d => `${getReleaseVersion(d.commit)} (${d.commit.id.slice(0, 7)})`),
datasets: [
{
label: name,
Expand Down

0 comments on commit 87ee8e2

Please sign in to comment.