@@ -322,6 +322,10 @@ struct LocalOptions {
322
322
/// Include only benchmarks matching a prefix in this comma-separated list
323
323
#[ arg( long) ]
324
324
include : Option < String > ,
325
+
326
+ /// Include only benchmarks belonging to the given categories.
327
+ #[ arg( long, value_parser = EnumArgParser :: <Category >:: default ( ) , default_value = "Primary,Secondary" ) ]
328
+ category : MultiEnumValue < Category > ,
325
329
}
326
330
327
331
#[ derive( Debug , clap:: Args ) ]
@@ -605,7 +609,7 @@ struct DownloadCommand {
605
609
force : bool ,
606
610
607
611
/// What category does the benchmark belong to
608
- #[ arg( long, short( 'c' ) , value_enum, global = true , default_value = "primary " ) ]
612
+ #[ arg( long, short( 'c' ) , value_enum, global = true , default_value = "Primary " ) ]
609
613
category : Category ,
610
614
611
615
/// What artifact type (library or binary) does the benchmark build.
@@ -909,7 +913,7 @@ fn main_result() -> anyhow::Result<i32> {
909
913
local. exclude . as_deref ( ) ,
910
914
local. exclude_suffix . as_deref ( ) ,
911
915
) ?;
912
- benchmarks. retain ( |b| b . category ( ) . is_primary_or_secondary ( ) ) ;
916
+ benchmarks. retain ( |b| local . category . 0 . contains ( & b . category ( ) ) ) ;
913
917
914
918
let artifact_id = ArtifactId :: Tag ( toolchain. id . clone ( ) ) ;
915
919
let mut conn = rt. block_on ( pool. connection ( ) ) ;
@@ -1082,7 +1086,7 @@ fn main_result() -> anyhow::Result<i32> {
1082
1086
local. exclude . as_deref ( ) ,
1083
1087
local. exclude_suffix . as_deref ( ) ,
1084
1088
) ?;
1085
- benchmarks. retain ( |b| b . category ( ) . is_primary_or_secondary ( ) ) ;
1089
+ benchmarks. retain ( |b| local . category . 0 . contains ( & b . category ( ) ) ) ;
1086
1090
1087
1091
let mut errors = BenchmarkErrors :: new ( ) ;
1088
1092
0 commit comments