Skip to content

Commit 1dcd547

Browse files
authored
Merge pull request #2189 from Kobzol/self-profile-profile
Log duration of self-profile parsing
2 parents 7488dff + 11de262 commit 1dcd547

File tree

1 file changed

+6
-0
lines changed
  • collector/src/compile/execute

1 file changed

+6
-0
lines changed

collector/src/compile/execute/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use std::pin::Pin;
2222
use std::process::{self, Command};
2323
use std::str;
2424
use std::sync::LazyLock;
25+
use std::time::Instant;
2526

2627
pub mod bencher;
2728
mod etw_parser;
@@ -758,6 +759,7 @@ fn parse_self_profile(
758759
}
759760
let (profile, files) = if let Some(profile_path) = full_path {
760761
// measureme 0.8+ uses a single file
762+
let start = Instant::now();
761763
let data = fs::read(&profile_path)?;
762764

763765
// HACK: `decodeme` can unexpectedly panic on invalid data produced by rustc. We catch this
@@ -779,6 +781,10 @@ fn parse_self_profile(
779781
return Err(std::io::Error::new(ErrorKind::InvalidData, error));
780782
}
781783
};
784+
log::trace!(
785+
"Self profile analyze duration: {}",
786+
start.elapsed().as_secs_f64()
787+
);
782788

783789
let profile = SelfProfile {
784790
artifact_sizes: results.artifact_sizes,

0 commit comments

Comments
 (0)