Skip to content

Commit 2cdeaa1

Browse files
committed
don't bubble self-profiling data errors up
this avoids crashing the collector and acts as if we had no data, which is not incorrect
1 parent aefad8a commit 2cdeaa1

File tree

1 file changed

+15
-1
lines changed
  • collector/src/compile/execute

1 file changed

+15
-1
lines changed

collector/src/compile/execute/mod.rs

+15-1
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,21 @@ fn process_stat_output(
574574
return Err(DeserializeStatError::NoOutput(output));
575575
}
576576
let (profile, files) = match (self_profile_dir, self_profile_crate) {
577-
(Some(dir), Some(krate)) => parse_self_profile(dir, krate)?,
577+
(Some(dir), Some(krate)) => {
578+
// FIXME: errors reading the self-profile data should be recorded as benchmark failures
579+
// and made more visible in the UI. Until then, we only log errors and continue with the
580+
// run, as if we had no self-profile data.
581+
// The self-profile page already supports missing data, but it's unclear exactly how the
582+
// rest of the site handles this situation.
583+
// In any case it's better than crashing the collector and looping indefinitely trying
584+
// to to complete a run -- which happens if we propagate `parse_self_profile`'s errors
585+
// up to the caller.
586+
if let Ok(self_profile_data) = parse_self_profile(dir, krate) {
587+
self_profile_data
588+
} else {
589+
(None, None)
590+
}
591+
}
578592
_ => (None, None),
579593
};
580594
Ok((stats, profile, files))

0 commit comments

Comments
 (0)