Skip to content

Commit 0141321

Browse files
committed
Add known unit to runtime page table for wall-time
1 parent 7cd2a11 commit 0141321

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

site/frontend/src/pages/compare/runtime/comparisons-table.vue

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,28 @@ import {TestCaseComparison} from "../data";
33
import Tooltip from "../tooltip.vue";
44
import {percentClass} from "../shared";
55
import {RuntimeTestCase} from "./common";
6+
import {computed} from "vue";
67
78
const props = defineProps<{
89
comparisons: TestCaseComparison<RuntimeTestCase>[];
910
hasNonRelevant: boolean;
1011
showRawData: boolean;
12+
metric: string;
1113
}>();
1214
1315
function prettifyRawNumber(number: number): string {
1416
return number.toLocaleString();
1517
}
18+
19+
const unit = computed(() => {
20+
// The DB stored wall-time data in nanoseconds for runtime benchmarks, so it is
21+
// hardcoded here
22+
if (props.metric == "wall-time") {
23+
return "ns";
24+
} else {
25+
return null;
26+
}
27+
});
1628
</script>
1729

1830
<template>
@@ -90,14 +102,14 @@ function prettifyRawNumber(number: number): string {
90102
</div>
91103
</td>
92104
<td v-if="showRawData" class="numeric">
93-
<abbr :title="comparison.datumA.toString()">{{
94-
prettifyRawNumber(comparison.datumA)
95-
}}</abbr>
105+
<abbr :title="comparison.datumA.toString()"
106+
>{{ prettifyRawNumber(comparison.datumA) }}{{ unit }}</abbr
107+
>
96108
</td>
97109
<td v-if="showRawData" class="numeric">
98-
<abbr :title="comparison.datumB.toString()">{{
99-
prettifyRawNumber(comparison.datumB)
100-
}}</abbr>
110+
<abbr :title="comparison.datumB.toString()"
111+
>{{ prettifyRawNumber(comparison.datumB) }}{{ unit }}</abbr
112+
>
101113
</td>
102114
</tr>
103115
</template>

site/frontend/src/pages/compare/runtime/runtime-page.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ const filteredSummary = computed(() => computeSummary(comparisons.value));
124124
:comparisons="comparisons"
125125
:has-non-relevant="allComparisons.length > 0"
126126
:show-raw-data="filter.showRawData"
127+
:metric="selector.stat"
127128
/>
128129
</template>
129130

0 commit comments

Comments
 (0)