1- import { BenchmarkFilter , CompareResponse , StatComparison } from "../types" ;
1+ import {
2+ BenchmarkFilter ,
3+ CompareResponse ,
4+ StatComparison ,
5+ TargetSet ,
6+ } from "../types" ;
27import { calculateComparison , TestCaseComparison } from "../data" ;
3- import { benchmarkNameMatchesFilter } from "../shared" ;
8+ import { benchmarkNameMatchesFilter , targetMatchesFilter } from "../shared" ;
49
510export type CompileBenchmarkFilter = {
611 profile : {
@@ -19,9 +24,7 @@ export type CompileBenchmarkFilter = {
1924 llvm : boolean ;
2025 cranelift : boolean ;
2126 } ;
22- target : {
23- x86_64_unknown_linux_gnu : boolean ;
24- } ;
27+ target : TargetSet ;
2528 category : {
2629 primary : boolean ;
2730 secondary : boolean ;
@@ -160,15 +163,6 @@ export function computeCompileComparisonsWithNonRelevant(
160163 }
161164 }
162165
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-
172166 function artifactFilter ( metadata : CompileBenchmarkMetadata | null ) : boolean {
173167 if ( metadata ?. binary === null ) return true ;
174168
@@ -201,7 +195,7 @@ export function computeCompileComparisonsWithNonRelevant(
201195 profileFilter ( comparison . testCase . profile ) &&
202196 scenarioFilter ( comparison . testCase . scenario ) &&
203197 backendFilter ( comparison . testCase . backend ) &&
204- targetFilter ( comparison . testCase . target ) &&
198+ targetMatchesFilter ( comparison . testCase . target , filter . target ) &&
205199 categoryFilter ( comparison . testCase . category ) &&
206200 artifactFilter ( benchmarkMap [ comparison . testCase . benchmark ] ?? null ) &&
207201 changeFilter ( comparison ) &&
0 commit comments