Skip to content

Commit 70e986d

Browse files
committed
Add a few more logs to collector
1 parent 3fbeb90 commit 70e986d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

collector/src/compile/execute/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,13 @@ impl<'a> CargoProcess<'a> {
198198
// really.
199199
pub async fn run_rustc(&mut self, needs_final: bool) -> anyhow::Result<()> {
200200
log::info!(
201-
"run_rustc with incremental={}, profile={:?}, scenario={:?}, patch={:?}, backend={:?}",
201+
"run_rustc with incremental={}, profile={:?}, scenario={:?}, patch={:?}, backend={:?}, phase={}",
202202
self.incremental,
203203
self.profile,
204204
self.processor_etc.as_ref().map(|v| v.1),
205205
self.processor_etc.as_ref().and_then(|v| v.3),
206-
self.backend
206+
self.backend,
207+
if needs_final { "benchmark" } else { "dependencies" }
207208
);
208209

209210
loop {

collector/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use crate::compile::benchmark::{Benchmark, BenchmarkName};
1616
use crate::runtime::{BenchmarkGroup, BenchmarkSuite};
1717
use database::{ArtifactId, ArtifactIdNumber, Connection};
1818
use process::Stdio;
19-
use std::time::Duration;
19+
use std::time::{Duration, Instant};
2020

2121
#[derive(Debug, Copy, Clone, PartialEq, PartialOrd, Deserialize)]
2222
pub struct DeltaTime(#[serde(with = "round_float")] pub f64);
@@ -228,12 +228,14 @@ pub async fn async_command_output(
228228
) -> anyhow::Result<process::Output> {
229229
use anyhow::Context;
230230

231+
let start = Instant::now();
231232
let child = cmd
232233
.stdout(Stdio::piped())
233234
.stderr(Stdio::piped())
234235
.spawn()
235236
.with_context(|| format!("failed to spawn process for cmd: {:?}", cmd))?;
236237
let output = child.wait_with_output().await?;
238+
log::trace!("command {cmd:?} took {} ms", start.elapsed().as_millis());
237239

238240
if !output.status.success() {
239241
return Err(anyhow::anyhow!(

0 commit comments

Comments
 (0)