Skip to content

Commit d7d577d

Browse files
committed
Remove manual usage of run_command_with_output
1 parent ace8e29 commit d7d577d

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

collector/src/runtime/mod.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub use benchmark::{
1515
use database::{ArtifactIdNumber, CollectionId, Connection};
1616

1717
use crate::utils::git::get_rustc_perf_commit;
18-
use crate::{run_command_with_output, CollectorCtx};
18+
use crate::{command_output, CollectorCtx};
1919

2020
mod benchmark;
2121
mod profile;
@@ -218,15 +218,7 @@ fn execute_runtime_benchmark_binary(
218218
command.args(["--include", &filter.include.join(",")]);
219219
}
220220

221-
let output = run_command_with_output(&mut command)?;
222-
if !output.status.success() {
223-
return Err(anyhow::anyhow!(
224-
"Process finished with exit code {}\n{}",
225-
output.status.code().unwrap_or(-1),
226-
String::from_utf8_lossy(&output.stderr)
227-
));
228-
}
229-
221+
let output = command_output(&mut command)?;
230222
let reader = BufReader::new(Cursor::new(output.stdout));
231223
Ok(reader.lines().map(|line| {
232224
Ok(line.and_then(|line| Ok(serde_json::from_str::<BenchmarkMessage>(&line)?))?)

0 commit comments

Comments
 (0)