Skip to content

Commit 554a14a

Browse files
committed
Fix key-values
1 parent b1a78dc commit 554a14a

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/default_index_html.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,13 @@ export const DEFAULT_INDEX_HTML = String.raw`<!DOCTYPE html>
8888
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Slight shadow */
8989
}
9090
.benchmark-chart-overview {
91+
display: flex;
92+
flex-direction: column;
9193
max-width: 90%;
9294
width: auto; /* Make width adaptive */
9395
min-width: 1000px; /* Set minimum width to 1000px */
94-
height: auto; /* Make height adaptive */
95-
min-height: 600px;
96+
height: 80vh; /* Make height adaptive */
97+
min-height: 1000px;
9698
max-height: 1500px; /* Make height adaptive */
9799
background-color: #ffffff; /* White background for better chart display */
98100
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Slight shadow */
@@ -210,8 +212,8 @@ export const DEFAULT_INDEX_HTML = String.raw`<!DOCTYPE html>
210212
// Get normalized data with display flag
211213
function getNormalizedData(dataSets) {
212214
function extractValuesAndTitle(map) {
213-
const linuxEntry = [...map.values()].find(entry => entry[0].bench.extra === 'linux_avg');
214-
const asterinasEntry = [...map.values()].find(entry => entry[0].bench.extra === 'aster_avg');
215+
const linuxEntry = [...map.values()].find(entry => entry[0].bench.extra === 'linux_result');
216+
const asterinasEntry = [...map.values()].find(entry => entry[0].bench.extra === 'aster_result');
215217
216218
if (!linuxEntry || !asterinasEntry) {
217219
throw new Error('Linux or Asterinas entry not found');
@@ -464,12 +466,12 @@ export const DEFAULT_INDEX_HTML = String.raw`<!DOCTYPE html>
464466
465467
const nameElem = document.createElement('h1');
466468
nameElem.className = 'benchmark-title';
467-
nameElem.textContent = dataSet.values().next().value.length > 0 ? dataSet.values().next().value[0].title : '';
469+
nameElem.textContent = dataSet.values().next().value.length > 0 ? dataSet.values().next().value[dataSet.values().next().value.length-1].title : '';
468470
setElem.appendChild(nameElem);
469-
471+
console.log(dataSet);
470472
const descriptionElem = document.createElement('div');
471473
descriptionElem.className = 'chart-description';
472-
descriptionElem.textContent = dataSet.values().next().value.length > 0 ? dataSet.values().next().value[0].description : '';
474+
descriptionElem.textContent = dataSet.values().next().value.length > 0 ? dataSet.values().next().value[dataSet.values().next().value.length-1].description : '';
473475
setElem.appendChild(descriptionElem);
474476
475477
const graphsElem = document.createElement('div');

0 commit comments

Comments
 (0)