Skip to content

Commit 32fb790

Browse files
committed
Show backend in compare page
1 parent dc43fb4 commit 32fb790

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

site/frontend/src/pages/compare/compile/common.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export const defaultCompileFilter: CompileBenchmarkFilter = {
5151
};
5252

5353
export type Profile = "check" | "debug" | "opt" | "doc";
54+
export type CodegenBackend = "llvm" | "cranelift";
5455
export type Category = "primary" | "secondary";
5556

5657
export type CompileBenchmarkMap = Dict<CompileBenchmarkMetadata>;
@@ -74,13 +75,15 @@ export interface CompileBenchmarkComparison {
7475
benchmark: string;
7576
profile: Profile;
7677
scenario: string;
78+
backend: CodegenBackend;
7779
comparison: StatComparison;
7880
}
7981

8082
export interface CompileTestCase {
8183
benchmark: string;
8284
profile: Profile;
8385
scenario: string;
86+
backend: CodegenBackend;
8487
category: Category;
8588
}
8689

@@ -156,6 +159,7 @@ export function computeCompileComparisonsWithNonRelevant(
156159
benchmark: c.benchmark,
157160
profile: c.profile,
158161
scenario: c.scenario,
162+
backend: c.backend,
159163
category: (benchmarkMap[c.benchmark] || {}).category || "secondary",
160164
};
161165
return calculateComparison(c.comparison, testCase);

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ const {toggleExpanded, isExpanded} = useExpandedStore();
5656
<th>Benchmark</th>
5757
<th>Profile</th>
5858
<th>Scenario</th>
59+
<th>Backend</th>
5960
<th>% Change</th>
6061
<th class="narrow">
6162
Significance Threshold
@@ -99,6 +100,7 @@ const {toggleExpanded, isExpanded} = useExpandedStore();
99100
{{ comparison.testCase.profile }}
100101
</td>
101102
<td>{{ comparison.testCase.scenario }}</td>
103+
<td>{{ comparison.testCase.backend }}</td>
102104
<td>
103105
<div class="numeric-aligned">
104106
<span v-bind:class="percentClass(comparison.percent)">

site/src/api.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ pub mod comparison {
271271
pub benchmark: String,
272272
pub profile: String,
273273
pub scenario: String,
274+
pub backend: String,
274275
pub comparison: StatComparison,
275276
}
276277

site/src/comparison.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ pub async fn handle_compare(
152152
benchmark: comparison.benchmark.to_string(),
153153
profile: comparison.profile.to_string(),
154154
scenario: comparison.scenario.to_string(),
155+
backend: comparison.backend.to_string(),
155156
comparison: comparison.comparison.into(),
156157
})
157158
.collect();

0 commit comments

Comments
 (0)