about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/tools/rust-analyzer/xtask/src/metrics.rs20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/tools/rust-analyzer/xtask/src/metrics.rs b/src/tools/rust-analyzer/xtask/src/metrics.rs
index 6ff6a1b1531..c9eea871060 100644
--- a/src/tools/rust-analyzer/xtask/src/metrics.rs
+++ b/src/tools/rust-analyzer/xtask/src/metrics.rs
@@ -16,13 +16,16 @@ type Unit = String;
 impl flags::Metrics {
     pub(crate) fn run(self, sh: &Shell) -> anyhow::Result<()> {
         let mut metrics = Metrics::new(sh)?;
-        if !Path::new("./target/rustc-perf").exists() {
-            sh.create_dir("./target/rustc-perf")?;
-            cmd!(sh, "git clone https://github.com/rust-lang/rustc-perf.git ./target/rustc-perf")
-                .run()?;
+        if !Path::new("./target/metrics/rustc-perf").exists() {
+            sh.create_dir("./target/metrics/rustc-perf")?;
+            cmd!(
+                sh,
+                "git clone https://github.com/rust-lang/rustc-perf.git ./target/metrics/rustc-perf"
+            )
+            .run()?;
         }
         {
-            let _d = sh.push_dir("./target/rustc-perf");
+            let _d = sh.push_dir("./target/metrics/rustc-perf");
             let revision = &metrics.perf_revision;
             cmd!(sh, "git reset --hard {revision}").run()?;
         }
@@ -88,11 +91,12 @@ impl Metrics {
 
         cmd!(
             sh,
-            "git clone --depth=1 --branch 1.76.0 https://github.com/rust-lang/rust.git --single-branch"
+            "git clone --depth=1 --branch 1.76.0 https://github.com/rust-lang/rust.git --single-branch ./target/metrics/rust"
         )
         .run()?;
 
-        let output = cmd!(sh, "./target/release/rust-analyzer rustc-tests ./rust").read()?;
+        let output =
+            cmd!(sh, "./target/release/rust-analyzer rustc-tests ./target/metrics/rust").read()?;
         for (metric, value, unit) in parse_metrics(&output) {
             self.report(metric, value, unit.into());
         }
@@ -106,7 +110,7 @@ impl Metrics {
         self.measure_analysis_stats_path(
             sh,
             bench,
-            &format!("./target/rustc-perf/collector/compile-benchmarks/{bench}"),
+            &format!("./target/metrics/rustc-perf/collector/compile-benchmarks/{bench}"),
         )
     }
     fn measure_analysis_stats_path(