@@ -16,13 +16,16 @@ type Unit = String;
1616impl flags:: Metrics {
1717 pub ( crate ) fn run ( self , sh : & Shell ) -> anyhow:: Result < ( ) > {
1818 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 ( ) ?;
2326 }
2427 {
25- let _d = sh. push_dir ( "./target/rustc-perf" ) ;
28+ let _d = sh. push_dir ( "./target/metrics/ rustc-perf" ) ;
2629 let revision = & metrics. perf_revision ;
2730 cmd ! ( sh, "git reset --hard {revision}" ) . run ( ) ?;
2831 }
@@ -88,11 +91,12 @@ impl Metrics {
8891
8992 cmd ! (
9093 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 "
9295 )
9396 . run ( ) ?;
9497
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 ( ) ?;
96100 for ( metric, value, unit) in parse_metrics ( & output) {
97101 self . report ( metric, value, unit. into ( ) ) ;
98102 }
@@ -106,7 +110,7 @@ impl Metrics {
106110 self . measure_analysis_stats_path (
107111 sh,
108112 bench,
109- & format ! ( "./target/rustc-perf/collector/compile-benchmarks/{bench}" ) ,
113+ & format ! ( "./target/metrics/ rustc-perf/collector/compile-benchmarks/{bench}" ) ,
110114 )
111115 }
112116 fn measure_analysis_stats_path (
0 commit comments