@@ -8,7 +8,7 @@ use collector::compile::benchmark::category::Category;
8
8
use collector:: compile:: benchmark:: profile:: Profile ;
9
9
use collector:: compile:: benchmark:: scenario:: Scenario ;
10
10
use collector:: compile:: benchmark:: {
11
- compile_benchmark_dir, get_compile_benchmarks, Benchmark , BenchmarkName ,
11
+ compile_benchmark_dir, get_compile_benchmarks, ArtifactType , Benchmark , BenchmarkName ,
12
12
} ;
13
13
use collector:: { runtime, utils, CollectorCtx , CollectorStepBuilder } ;
14
14
use database:: { ArtifactId , ArtifactIdNumber , Commit , CommitType , Connection , Pool } ;
@@ -586,6 +586,10 @@ struct DownloadCommand {
586
586
#[ arg( long, short( 'c' ) , value_enum, global = true , default_value = "primary" ) ]
587
587
category : Category ,
588
588
589
+ /// What artifact type (library or binary) does the benchmark build.
590
+ #[ arg( long, short( 'a' ) , value_enum, global = true , default_value = "library" ) ]
591
+ artifact : ArtifactType ,
592
+
589
593
#[ command( subcommand) ]
590
594
command : DownloadSubcommand ,
591
595
}
@@ -948,9 +952,15 @@ fn main_result() -> anyhow::Result<i32> {
948
952
}
949
953
} ;
950
954
951
- add_perf_config ( & target_dir, cmd. category ) ;
955
+ add_perf_config ( & target_dir, cmd. category , cmd . artifact ) ;
952
956
953
- println ! ( "Benchmark stored at {}" , target_dir. display( ) ) ;
957
+ println ! (
958
+ r#"Benchmark stored at {dir} using category `{}` and artifact type `{}`.
959
+ Make sure to modify `{dir}/perf-config.json` if the category/artifact don't match your expectations."# ,
960
+ cmd. category,
961
+ cmd. artifact,
962
+ dir = target_dir. display( ) ,
963
+ ) ;
954
964
Ok ( 0 )
955
965
}
956
966
}
@@ -1249,9 +1259,10 @@ async fn record_toolchain_sizes(
1249
1259
record ( conn, aid, "libLLVM" , paths. lib_llvm . as_deref ( ) ) . await ;
1250
1260
}
1251
1261
1252
- fn add_perf_config ( directory : & Path , category : Category ) {
1262
+ fn add_perf_config ( directory : & Path , category : Category , artifact : ArtifactType ) {
1253
1263
let data = serde_json:: json!( {
1254
- "category" : category. to_string( )
1264
+ "category" : category,
1265
+ "artifact" : artifact
1255
1266
} ) ;
1256
1267
1257
1268
let mut file = BufWriter :: new (
0 commit comments