Skip to content

Commit 137407a

Browse files
committed
fix benchmark descriptions
1 parent 5e0539a commit 137407a

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

devops/scripts/benchmarks/html/index.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,16 @@
264264
.display-options input {
265265
margin-right: 8px;
266266
}
267+
.benchmark-description {
268+
background-color: #f2f2f2;
269+
color: #333;
270+
padding: 10px;
271+
margin-bottom: 10px;
272+
border-radius: 5px;
273+
border-left: 4px solid #6c757d;
274+
white-space: pre-line;
275+
font-style: italic;
276+
}
267277
</style>
268278
</head>
269279
<body>

devops/scripts/benchmarks/html/scripts.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ function createChartContainer(data, canvasId, type) {
260260
const extraInfo = document.createElement('div');
261261
extraInfo.className = 'extra-info';
262262
latestRunsLookup = createLatestRunsLookup(benchmarkRuns);
263-
extraInfo.innerHTML = generateExtraInfo(latestRunsLookup, data);
263+
extraInfo.innerHTML = generateExtraInfo(latestRunsLookup, data, 'benchmark');
264264
details.appendChild(extraInfo);
265265

266266
container.appendChild(details);
@@ -299,11 +299,11 @@ function createLatestRunsLookup(benchmarkRuns) {
299299
return latestRunsMap;
300300
}
301301

302-
function generateExtraInfo(latestRunsLookup, data) {
302+
function generateExtraInfo(latestRunsLookup, data, type) {
303303
const labels = data.datasets ? data.datasets.map(dataset => dataset.label) : [data.label];
304304

305305
return labels.map(label => {
306-
const metadata = metadataForLabel(label);
306+
const metadata = metadataForLabel(label, type);
307307
const latestRun = latestRunsLookup.get(label);
308308

309309
let html = '<div class="extra-info-entry">';

0 commit comments

Comments
 (0)