From 605cecdde33e2ae84dec5653af4d8f9bc2649b17 Mon Sep 17 00:00:00 2001 From: Sebastian Ullrich Date: Wed, 24 Apr 2024 17:55:27 +0200 Subject: [PATCH] fix: show trace timings in infoview (#3985) A regression introduced by #3801 --- src/Lean/Widget/InteractiveDiagnostic.lean | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Lean/Widget/InteractiveDiagnostic.lean b/src/Lean/Widget/InteractiveDiagnostic.lean index f47b7685f5..a5e8be1c91 100644 --- a/src/Lean/Widget/InteractiveDiagnostic.lean +++ b/src/Lean/Widget/InteractiveDiagnostic.lean @@ -144,7 +144,9 @@ where | ctx, compose d₁ d₂ => do let d₁ ← go nCtx ctx d₁; let d₂ ← go nCtx ctx d₂; pure $ d₁ ++ d₂ | ctx, group d => Format.group <$> go nCtx ctx d | ctx, .trace data header children => do - let header := (← go nCtx ctx header).nest 4 + let mut header := (← go nCtx ctx header).nest 4 + if data.startTime != 0 then + header := f!"[{data.stopTime - data.startTime}] {header}" let nodes ← if data.collapsed && !children.isEmpty then let children := children.map fun child =>