hyperfine

Nia Espera created

Change summary

tooling/xtask/src/tasks/workflows/compare_perf.rs | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

Detailed changes

tooling/xtask/src/tasks/workflows/compare_perf.rs 🔗

@@ -3,7 +3,7 @@ use gh_workflow::*;
 use crate::tasks::workflows::steps::FluentBuilder;
 use crate::tasks::workflows::{
     runners,
-    steps::{self, named, upload_artifact, NamedJob},
+    steps::{self, NamedJob, named, upload_artifact},
     vars::Input,
 };
 
@@ -26,6 +26,10 @@ pub fn run_perf(base: &Input, head: &Input) -> NamedJob {
         named::bash(&format!("cargo perf-test -p gpui -- --json={ref_name}"))
     }
 
+    fn install_hyperfine() -> Step<Run> {
+        named::bash("cargo install hyperfine")
+    }
+
     fn git_checkout(ref_name: String) -> Step<Run> {
         named::bash(&format!(
             "git fetch origin {ref_name} && git checkout {ref_name}"
@@ -45,6 +49,7 @@ pub fn run_perf(base: &Input, head: &Input) -> NamedJob {
             .add_step(steps::checkout_repo())
             .add_step(steps::setup_cargo_config(runners::Platform::Linux))
             .map(steps::install_linux_dependencies)
+            .add_step(install_hyperfine())
             .add_step(git_checkout(base.var()))
             .add_step(cargo_perf_test(base.var()))
             .add_step(git_checkout(head.var()))