6825: Fix memory usage metrics r=jonas-schievink a=jonas-schievink

Let's see if this fixes https://github.com/rust-analyzer/rust-analyzer/issues/6808

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
This commit is contained in:
bors[bot] 2020-12-11 14:48:27 +00:00 committed by GitHub
commit 57ea320ffc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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());
}