mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 12:33:33 +00:00
metrics: go back to cmd!
This commit is contained in:
parent
2fdde98b5c
commit
cb35d3a05a
1 changed files with 3 additions and 6 deletions
|
@ -3,7 +3,6 @@ use std::{
|
|||
env,
|
||||
io::Write as _,
|
||||
path::Path,
|
||||
process::{Command, Stdio},
|
||||
time::{Instant, SystemTime, UNIX_EPOCH},
|
||||
};
|
||||
|
||||
|
@ -82,11 +81,9 @@ impl Metrics {
|
|||
}
|
||||
fn measure_analysis_stats_path(&mut self, name: &str, path: &str) -> Result<()> {
|
||||
eprintln!("\nMeasuring analysis-stats/{}", name);
|
||||
let output = Command::new("./target/release/rust-analyzer")
|
||||
.args(&["analysis-stats", "--quiet", "--memory-usage", path])
|
||||
.stderr(Stdio::inherit())
|
||||
.output()?;
|
||||
let output = String::from_utf8(output.stdout)?;
|
||||
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());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue