Fix memory usage metrics

This commit is contained in:
Jonas Schievink 2020-12-11 15:47:40 +01:00
parent 15a644d606
commit 777d8dca26

View file

@ -81,7 +81,9 @@ impl Metrics {
}
fn measure_analysis_stats_path(&mut self, name: &str, path: &str) -> Result<()> {
eprintln!("\nMeasuring analysis-stats/{}", name);
let output = cmd!("./target/release/rust-analyzer analysis-stats --quiet {path}").read()?;
let output =
cmd!("./target/release/rust-analyzer analysis-stats --quiet --memory-usage {path}")
.read()?;
for (metric, value, unit) in parse_metrics(&output) {
self.report(&format!("analysis-stats/{}/{}", name, metric), value, unit.into());
}