Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit dfe1ec1

Browse files
committed
Add summary to runtime page
1 parent 19c3f66 commit dfe1ec1

File tree

2 files changed

+31
-9
lines changed

2 files changed

+31
-9
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ function updateFilter(newFilter: CompileBenchmarkFilter) {
141141
}
142142
143143
function exportData() {
144-
exportToMarkdown(testCases.value);
144+
exportToMarkdown(comparisons.value);
145145
}
146146
147147
const urlParams = getUrlParams();
@@ -150,17 +150,17 @@ const quickLinksKey = ref(0);
150150
const filter = ref(loadFilterFromUrl(urlParams, defaultCompileFilter));
151151
152152
const benchmarkMap = createCompileBenchmarkMap(props.data);
153-
const allTestCases = computed(() =>
153+
const allComparisons = computed(() =>
154154
computeCompileComparisonsWithNonRelevant(
155155
filter.value,
156156
props.data.compile_comparisons,
157157
benchmarkMap
158158
)
159159
);
160-
const testCases = computed(() =>
161-
filterNonRelevant(filter.value, allTestCases.value)
160+
const comparisons = computed(() =>
161+
filterNonRelevant(filter.value, allComparisons.value)
162162
);
163-
const filteredSummary = computed(() => computeSummary(testCases.value));
163+
const filteredSummary = computed(() => computeSummary(comparisons.value));
164164
</script>
165165

166166
<template>
@@ -172,11 +172,11 @@ const filteredSummary = computed(() => computeSummary(testCases.value));
172172
@export="exportData"
173173
/>
174174
<OverallSummary :summary="filteredSummary" />
175-
<Aggregations :cases="testCases" />
175+
<Aggregations :cases="comparisons" />
176176
<Benchmarks
177177
:data="data"
178-
:test-cases="testCases"
179-
:all-test-cases="allTestCases"
178+
:test-cases="comparisons"
179+
:all-test-cases="allComparisons"
180180
:filter="filter"
181181
:stat="selector.stat"
182182
></Benchmarks>
Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
11
<script setup lang="ts">
22
import {CompareResponse} from "../types";
3+
import OverallSummary from "../summary/overall-summary.vue";
4+
import {computed, ref} from "vue";
5+
import {computeSummary, filterNonRelevant} from "../data";
6+
import {
7+
computeRuntimeComparisonsWithNonRelevant,
8+
defaultRuntimeFilter,
9+
} from "./common";
10+
import {deepCopy} from "../../../utils/copy";
311
412
const props = defineProps<{data: CompareResponse}>();
13+
14+
const filter = ref(deepCopy(defaultRuntimeFilter));
15+
const allComparisons = computed(() =>
16+
computeRuntimeComparisonsWithNonRelevant(
17+
filter.value,
18+
props.data.runtime_comparisons
19+
)
20+
);
21+
const comparisons = computed(() =>
22+
filterNonRelevant(filter.value, allComparisons.value)
23+
);
24+
const filteredSummary = computed(() => computeSummary(comparisons.value));
525
</script>
626

7-
<template></template>
27+
<template>
28+
<OverallSummary :summary="filteredSummary" />
29+
</template>

0 commit comments

Comments
 (0)