Skip to content

Commit f9a4588

Browse files
committed
Do not create a span for cached commands
1 parent b4a357f commit f9a4588

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bootstrap/src/utils/exec.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -681,16 +681,16 @@ impl ExecutionContext {
681681
) -> DeferredCommand<'a> {
682682
let fingerprint = command.fingerprint();
683683

684-
#[cfg(feature = "tracing")]
685-
let span_guard = crate::utils::tracing::trace_cmd(command);
686-
687684
if let Some(cached_output) = self.command_cache.get(&fingerprint) {
688685
command.mark_as_executed();
689686
self.verbose(|| println!("Cache hit: {command:?}"));
690687
self.profiler.record_cache_hit(fingerprint);
691688
return DeferredCommand { state: CommandState::Cached(cached_output) };
692689
}
693690

691+
#[cfg(feature = "tracing")]
692+
let span_guard = crate::utils::tracing::trace_cmd(command);
693+
694694
let created_at = command.get_created_location();
695695
let executed_at = std::panic::Location::caller();
696696

0 commit comments

Comments
 (0)