MCPcopy Create free account
hub / github.com/Snapchat/Valdi / registerProfilingCommand

Function registerProfilingCommand

valdi/vscode_debugger/src/ui/profiling.ts:10–26  ·  view source on GitHub ↗
(
  context: vscode.ExtensionContext,
  container: Container,
)

Source from the content-addressed store, hash-verified

8import { UiProfileManager } from './profiling/uiProfileManager';
9
10export const registerProfilingCommand = (
11 context: vscode.ExtensionContext,
12 container: Container,
13) => {
14 const manager = container.get(UiProfileManager);
15
16 context.subscriptions.push(
17 registerCommand(vscode.commands, Commands.StartProfile, sessionIdOrArgs =>
18 manager.start(
19 typeof sessionIdOrArgs === 'string'
20 ? { sessionId: sessionIdOrArgs }
21 : sessionIdOrArgs ?? {},
22 ),
23 ),
24 registerCommand(vscode.commands, Commands.StopProfile, sessionId => manager.stop(sessionId)),
25 );
26};

Callers 1

activateFunction · 0.90

Calls 5

registerCommandFunction · 0.90
getMethod · 0.65
startMethod · 0.65
stopMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected