@@ -322,6 +322,10 @@ struct LocalOptions {
322322 /// Include only benchmarks matching a prefix in this comma-separated list
323323 #[ arg( long) ]
324324 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 > ,
325329}
326330
327331#[ derive( Debug , clap:: Args ) ]
@@ -605,7 +609,7 @@ struct DownloadCommand {
605609 force : bool ,
606610
607611 /// 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 " ) ]
609613 category : Category ,
610614
611615 /// What artifact type (library or binary) does the benchmark build.
@@ -909,7 +913,7 @@ fn main_result() -> anyhow::Result<i32> {
909913 local. exclude . as_deref ( ) ,
910914 local. exclude_suffix . as_deref ( ) ,
911915 ) ?;
912- benchmarks. retain ( |b| b . category ( ) . is_primary_or_secondary ( ) ) ;
916+ benchmarks. retain ( |b| local . category . 0 . contains ( & b . category ( ) ) ) ;
913917
914918 let artifact_id = ArtifactId :: Tag ( toolchain. id . clone ( ) ) ;
915919 let mut conn = rt. block_on ( pool. connection ( ) ) ;
@@ -1082,7 +1086,7 @@ fn main_result() -> anyhow::Result<i32> {
10821086 local. exclude . as_deref ( ) ,
10831087 local. exclude_suffix . as_deref ( ) ,
10841088 ) ?;
1085- benchmarks. retain ( |b| b . category ( ) . is_primary_or_secondary ( ) ) ;
1089+ benchmarks. retain ( |b| local . category . 0 . contains ( & b . category ( ) ) ) ;
10861090
10871091 let mut errors = BenchmarkErrors :: new ( ) ;
10881092
0 commit comments