diff --git a/.github/workflows/metrics.yaml b/.github/workflows/metrics.yaml index 214359e3c3..bbeccd1621 100644 --- a/.github/workflows/metrics.yaml +++ b/.github/workflows/metrics.yaml @@ -67,7 +67,7 @@ jobs: other_metrics: strategy: matrix: - names: [self, ripgrep-13.0.0, webrender-2022, diesel-1.4.8] + names: [self, ripgrep-13.0.0, webrender-2022, diesel-1.4.8, hyper-0.14.18] runs-on: ubuntu-latest needs: [setup_cargo, build_metrics] @@ -133,10 +133,15 @@ jobs: with: name: diesel-1.4.8-${{ github.sha }} + - name: Download hyper-0.14.18 metrics + uses: actions/download-artifact@v3 + with: + name: hyper-0.14.18-${{ github.sha }} + - name: Combine json run: | git clone --depth 1 https://$METRICS_TOKEN@github.com/rust-analyzer/metrics.git - jq -s ".[0] * .[1] * .[2] * .[3] * .[4]" build.json self.json ripgrep-13.0.0.json webrender-2022.json diesel-1.4.8.json -c >> metrics/metrics.json + jq -s ".[0] * .[1] * .[2] * .[3] * .[4] * .[5]" build.json self.json ripgrep-13.0.0.json webrender-2022.json diesel-1.4.8.json hyper-0.14.18.json -c >> metrics/metrics.json cd metrics git add . git -c user.name=Bot -c user.email=dummy@example.com commit --message 📈 diff --git a/xtask/src/flags.rs b/xtask/src/flags.rs index af872facdf..e52cbfca3e 100644 --- a/xtask/src/flags.rs +++ b/xtask/src/flags.rs @@ -114,6 +114,7 @@ pub enum MeasurementType { AnalyzeRipgrep, AnalyzeWebRender, AnalyzeDiesel, + AnalyzeHyper, } impl FromStr for MeasurementType { @@ -125,6 +126,7 @@ impl FromStr for MeasurementType { "ripgrep-13.0.0" => Ok(Self::AnalyzeRipgrep), "webrender-2022" => Ok(Self::AnalyzeWebRender), "diesel-1.4.8" => Ok(Self::AnalyzeDiesel), + "hyper-0.14.18" => Ok(Self::AnalyzeHyper), _ => Err("Invalid option".to_string()), } } @@ -137,6 +139,7 @@ impl AsRef for MeasurementType { Self::AnalyzeRipgrep => "ripgrep-13.0.0", Self::AnalyzeWebRender => "webrender-2022", Self::AnalyzeDiesel => "diesel-1.4.8", + Self::AnalyzeHyper => "hyper-0.14.18", } } } diff --git a/xtask/src/metrics.rs b/xtask/src/metrics.rs index ade2248776..59d41d8e4b 100644 --- a/xtask/src/metrics.rs +++ b/xtask/src/metrics.rs @@ -39,13 +39,10 @@ impl flags::Metrics { MeasurementType::AnalyzeSelf => { metrics.measure_analysis_stats_self(sh)?; } - MeasurementType::AnalyzeRipgrep => { - metrics.measure_analysis_stats(sh, name)?; - } - MeasurementType::AnalyzeWebRender => { - metrics.measure_analysis_stats(sh, name)?; - } - MeasurementType::AnalyzeDiesel => { + MeasurementType::AnalyzeRipgrep + | MeasurementType::AnalyzeWebRender + | MeasurementType::AnalyzeDiesel + | MeasurementType::AnalyzeHyper => { metrics.measure_analysis_stats(sh, name)?; } }; @@ -57,6 +54,7 @@ impl flags::Metrics { metrics.measure_analysis_stats(sh, MeasurementType::AnalyzeRipgrep.as_ref())?; metrics.measure_analysis_stats(sh, MeasurementType::AnalyzeWebRender.as_ref())?; metrics.measure_analysis_stats(sh, MeasurementType::AnalyzeDiesel.as_ref())?; + metrics.measure_analysis_stats(sh, MeasurementType::AnalyzeHyper.as_ref())?; "all" } };