Skip to content

Implements trace logging#314383

Merged
hediet merged 2 commits intomainfrom
hediet/b/revolutionary-raccoon
May 5, 2026
Merged

Implements trace logging#314383
hediet merged 2 commits intomainfrom
hediet/b/revolutionary-raccoon

Conversation

@hediet
Copy link
Copy Markdown
Member

@hediet hediet commented May 5, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 5, 2026 13:20
@hediet hediet enabled auto-merge May 5, 2026 13:20
@hediet hediet self-assigned this May 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

Screenshot Changes

Base: fdfcb7b4 Current: 5199ecc5

Changed (12)

chat/input/chatInput/Default/Dark
Before After
before after
chat/input/chatInput/Default/Light
Before After
before after
chat/input/chatInput/WithArtifacts/Dark
Before After
before after
chat/input/chatInput/WithFileChanges/Light
Before After
before after
chat/input/chatInput/WithTodos/Dark
Before After
before after
chat/input/chatInput/WithTodos/Light
Before After
before after
chat/input/chatInput/WithTodosAndFileChanges/Dark
Before After
before after
chat/input/chatInput/WithArtifactsAndFileChanges/Dark
Before After
before after
chat/input/chatInput/WithArtifactsAndFileChanges/Light
Before After
before after
chat/input/chatInput/Full/Dark
Before After
before after
chat/widget/chatWidget/PendingToolApproval/Dark
Before After
before after
chat/widget/chatWidget/PendingToolApproval/Light
Before After
before after

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds trace-oriented diagnostic logging to the virtual scheduling test infrastructure and wires it into inline completions tests to emit a swimlane-style execution trace when enabled.

Changes:

  • Added a lightweight trace-aware logger (ITraceLogger) for tests and exported it from the virtual scheduling test utilities.
  • Extended runWithFakedTimers to optionally record timer history in both virtual-time and real-time modes and surface it via an onHistory callback.
  • Enhanced execution history rendering to include caller stack frame details and continuation lines, and enabled opt-in time-trace output from inline completions tests.
Show a summary per file
File Description
src/vs/editor/contrib/inlineCompletions/test/browser/utils.ts Adds optional time-trace logging, trace logger plumbing, and extra log calls in test contexts.
src/vs/editor/contrib/inlineCompletions/test/browser/inlineCompletions.test.ts Enables time-trace output for one test and adds logger.logRun(...) markers around model actions.
src/vs/base/test/common/virtualScheduling/virtualTimeApi.ts Increases captured stack depth for diagnostics and tweaks virtual timer scheduling behavior.
src/vs/base/test/common/virtualScheduling/traceLogger.ts Introduces a trace-capturing logger for weaving log lines into execution graphs.
src/vs/base/test/common/virtualScheduling/runWithFakedTimers.ts Adds onHistory support and installs a recording real-time TimeApi when not using fake timers.
src/vs/base/test/common/virtualScheduling/recordingTimeApi.ts Implements a recording wrapper around the host time API to capture executed timer events with traces.
src/vs/base/test/common/virtualScheduling/index.ts Re-exports the new recording API and trace logger utilities.
src/vs/base/test/common/executionGraph.ts Improves caller-frame extraction and renders multi-frame details as continuation lines in swimlanes.

Copilot's findings

  • Files reviewed: 8/8 changed files
  • Comments generated: 3

return clock.schedule({
time: clock.now + timeout,
run: () => { handler(); },
run: handler,
Comment on lines +11 to +17
// V8 default `Error.stackTraceLimit` of 10 swallows everything past the
// first async boundary in the stacks we capture for trace diagnostics.
// Bump it so swimlane callers actually see the user code that scheduled a
// timer rather than just the Promise wrapper.
if (typeof Error.stackTraceLimit === 'number' && Error.stackTraceLimit < 50) {
Error.stackTraceLimit = 50;
}
Comment on lines +260 to +262
const out: string = history.length === 0 && logs.length === 0
? `[time trace ${mode}] (no events)`
: `[time trace ${mode}] ${history.length} events, ${logs.length} log lines\n${renderSwimlanes(buildHistoryFromTasks(history, history[0]?.time ?? 0, logs))}`;
roblourens
roblourens previously approved these changes May 5, 2026
@hediet hediet merged commit bbf30e5 into main May 5, 2026
39 of 41 checks passed
@hediet hediet deleted the hediet/b/revolutionary-raccoon branch May 5, 2026 19:03
@vs-code-engineering vs-code-engineering Bot added this to the 1.120.0 milestone May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants