Skip to content

Commit 7cd2a11

Browse files
committed
Add known unit to compile page table for wall-time
1 parent 260098f commit 7cd2a11

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

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

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Tooltip from "../tooltip.vue";
44
import {ArtifactDescription} from "../types";
55
import {percentClass} from "../shared";
66
import {CompileBenchmarkMap, CompileTestCase} from "./common";
7+
import {computed} from "vue";
78
89
const props = defineProps<{
910
id: string;
@@ -92,6 +93,16 @@ Category: ${metadata.category}
9293
9394
return tooltip;
9495
}
96+
97+
const unit = computed(() => {
98+
// The DB stored wall-time data in seconds for compile benchmarks, so it is
99+
// hardcoded here
100+
if (props.stat == "wall-time") {
101+
return "s";
102+
} else {
103+
return null;
104+
}
105+
});
95106
</script>
96107

97108
<template>
@@ -194,16 +205,16 @@ Category: ${metadata.category}
194205
</td>
195206
<td v-if="showRawData" class="numeric">
196207
<a v-bind:href="detailedQueryRawDataLink(commitA, comparison)">
197-
<abbr :title="comparison.datumA.toString()">{{
198-
prettifyRawNumber(comparison.datumA)
199-
}}</abbr>
208+
<abbr :title="comparison.datumA.toString()"
209+
>{{ prettifyRawNumber(comparison.datumA) }}{{ unit }}</abbr
210+
>
200211
</a>
201212
</td>
202213
<td v-if="showRawData" class="numeric">
203214
<a v-bind:href="detailedQueryRawDataLink(commitB, comparison)">
204-
<abbr :title="comparison.datumB.toString()">{{
205-
prettifyRawNumber(comparison.datumB)
206-
}}</abbr>
215+
<abbr :title="comparison.datumB.toString()"
216+
>{{ prettifyRawNumber(comparison.datumB) }}{{ unit }}</abbr
217+
>
207218
</a>
208219
</td>
209220
</tr>

0 commit comments

Comments
 (0)