@@ -19,6 +19,9 @@ export type CompileBenchmarkFilter = {
1919 llvm : boolean ;
2020 cranelift : boolean ;
2121 } ;
22+ target : {
23+ x86_64_unknown_linux_gnu : boolean ;
24+ } ;
2225 category : {
2326 primary : boolean ;
2427 secondary : boolean ;
@@ -54,6 +57,9 @@ export const defaultCompileFilter: CompileBenchmarkFilter = {
5457 llvm : true ,
5558 cranelift : true ,
5659 } ,
60+ target : {
61+ x86_64_unknown_linux_gnu : true ,
62+ } ,
5763 category : {
5864 primary : true ,
5965 secondary : true ,
@@ -72,6 +78,7 @@ export const defaultCompileFilter: CompileBenchmarkFilter = {
7278export type Profile = "check" | "debug" | "opt" | "doc" ;
7379export type CodegenBackend = "llvm" | "cranelift" ;
7480export type Category = "primary" | "secondary" ;
81+ export type Target = "x86_64-unknown-linux-gnu" ;
7582
7683export type CompileBenchmarkMap = Dict < CompileBenchmarkMetadata > ;
7784
@@ -95,6 +102,7 @@ export interface CompileBenchmarkComparison {
95102 profile : Profile ;
96103 scenario : string ;
97104 backend : CodegenBackend ;
105+ target : Target ;
98106 comparison : StatComparison ;
99107}
100108
@@ -103,6 +111,7 @@ export interface CompileTestCase {
103111 profile : Profile ;
104112 scenario : string ;
105113 backend : CodegenBackend ;
114+ target : Target ;
106115 category : Category ;
107116}
108117
@@ -151,6 +160,15 @@ export function computeCompileComparisonsWithNonRelevant(
151160 }
152161 }
153162
163+ function targetFilter ( target : Target ) : boolean {
164+ if ( target === "x86_64-unknown-linux-gnu" ) {
165+ return filter . target . x86_64_unknown_linux_gnu ;
166+ } else {
167+ // Unknown, but by default we should show things
168+ return true ;
169+ }
170+ }
171+
154172 function artifactFilter ( metadata : CompileBenchmarkMetadata | null ) : boolean {
155173 if ( metadata ?. binary === null ) return true ;
156174
@@ -183,6 +201,7 @@ export function computeCompileComparisonsWithNonRelevant(
183201 profileFilter ( comparison . testCase . profile ) &&
184202 scenarioFilter ( comparison . testCase . scenario ) &&
185203 backendFilter ( comparison . testCase . backend ) &&
204+ targetFilter ( comparison . testCase . target ) &&
186205 categoryFilter ( comparison . testCase . category ) &&
187206 artifactFilter ( benchmarkMap [ comparison . testCase . benchmark ] ?? null ) &&
188207 changeFilter ( comparison ) &&
@@ -198,6 +217,7 @@ export function computeCompileComparisonsWithNonRelevant(
198217 profile : c . profile ,
199218 scenario : c . scenario ,
200219 backend : c . backend ,
220+ target : c . target ,
201221 category : ( benchmarkMap [ c . benchmark ] || { } ) . category || "secondary" ,
202222 } ;
203223 return calculateComparison ( c . comparison , testCase ) ;
@@ -242,18 +262,20 @@ export function transformDataForBackendComparison(
242262 cranelift : number | null ;
243263 benchmark : string ;
244264 profile : Profile ;
265+ target : Target ;
245266 scenario : string ;
246267 }
247268 > = new Map ( ) ;
248269 for ( const comparison of comparisons ) {
249- const key = `${ comparison . benchmark } ;${ comparison . profile } ;${ comparison . scenario } ` ;
270+ const key = `${ comparison . benchmark } ;${ comparison . profile } ;${ comparison . scenario } ; ${ comparison . target } ` ;
250271 if ( ! benchmarkMap . has ( key ) ) {
251272 benchmarkMap . set ( key , {
252273 llvm : null ,
253274 cranelift : null ,
254275 benchmark : comparison . benchmark ,
255276 profile : comparison . profile ,
256277 scenario : comparison . scenario ,
278+ target : comparison . target ,
257279 } ) ;
258280 }
259281 const record = benchmarkMap . get ( key ) ;
@@ -271,6 +293,7 @@ export function transformDataForBackendComparison(
271293 scenario : entry . scenario ,
272294 // Treat LLVM as the baseline
273295 backend : "llvm" ,
296+ target : entry . target ,
274297 comparison : {
275298 statistics : [ entry . llvm , entry . cranelift ] ,
276299 is_relevant : true ,
0 commit comments