@@ -16,13 +16,16 @@ type Unit = String;
16
16
impl flags:: Metrics {
17
17
pub ( crate ) fn run ( self , sh : & Shell ) -> anyhow:: Result < ( ) > {
18
18
let mut metrics = Metrics :: new ( sh) ?;
19
- if !Path :: new ( "./target/rustc-perf" ) . exists ( ) {
20
- sh. create_dir ( "./target/rustc-perf" ) ?;
21
- cmd ! ( sh, "git clone https://github.com/rust-lang/rustc-perf.git ./target/rustc-perf" )
22
- . run ( ) ?;
19
+ if !Path :: new ( "./target/metrics/rustc-perf" ) . exists ( ) {
20
+ sh. create_dir ( "./target/metrics/rustc-perf" ) ?;
21
+ cmd ! (
22
+ sh,
23
+ "git clone https://github.com/rust-lang/rustc-perf.git ./target/metrics/rustc-perf"
24
+ )
25
+ . run ( ) ?;
23
26
}
24
27
{
25
- let _d = sh. push_dir ( "./target/rustc-perf" ) ;
28
+ let _d = sh. push_dir ( "./target/metrics/ rustc-perf" ) ;
26
29
let revision = & metrics. perf_revision ;
27
30
cmd ! ( sh, "git reset --hard {revision}" ) . run ( ) ?;
28
31
}
@@ -88,11 +91,12 @@ impl Metrics {
88
91
89
92
cmd ! (
90
93
sh,
91
- "git clone --depth=1 --branch 1.76.0 https://github.com/rust-lang/rust.git --single-branch"
94
+ "git clone --depth=1 --branch 1.76.0 https://github.com/rust-lang/rust.git --single-branch ./target/metrics/rust "
92
95
)
93
96
. run ( ) ?;
94
97
95
- let output = cmd ! ( sh, "./target/release/rust-analyzer rustc-tests ./rust" ) . read ( ) ?;
98
+ let output =
99
+ cmd ! ( sh, "./target/release/rust-analyzer rustc-tests ./target/metrics/rust" ) . read ( ) ?;
96
100
for ( metric, value, unit) in parse_metrics ( & output) {
97
101
self . report ( metric, value, unit. into ( ) ) ;
98
102
}
@@ -106,7 +110,7 @@ impl Metrics {
106
110
self . measure_analysis_stats_path (
107
111
sh,
108
112
bench,
109
- & format ! ( "./target/rustc-perf/collector/compile-benchmarks/{bench}" ) ,
113
+ & format ! ( "./target/metrics/ rustc-perf/collector/compile-benchmarks/{bench}" ) ,
110
114
)
111
115
}
112
116
fn measure_analysis_stats_path (
0 commit comments