Check that the bench path exists before invoking analysis-stats

This commit is contained in:
Lukas Wirth 2023-09-03 10:03:20 +02:00
parent 3a6196bf9e
commit 520d02f561

View File

@ -97,6 +97,7 @@ fn measure_analysis_stats_path(
name: &str,
path: &str,
) -> anyhow::Result<()> {
assert!(Path::new(path).exists(), "unable to find bench in {path}");
eprintln!("\nMeasuring analysis-stats/{name}");
let output = cmd!(sh, "./target/release/rust-analyzer -q analysis-stats {path}").read()?;
for (metric, value, unit) in parse_metrics(&output) {