MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / createStartupProfiler

Function createStartupProfiler

src/server/startup-profiler.ts:17–34  ·  view source on GitHub ↗
(scope: string)

Source from the content-addressed store, hash-verified

15}
16
17export function createStartupProfiler(scope: string): StartupProfiler {
18 const enabled = isEnabled();
19 const startedAtMs = performance.now();
20
21 return {
22 enabled,
23 startedAtMs,
24 mark(stage: string, stageStartedAtMs: number): void {
25 if (!enabled) return;
26 const elapsedMs = performance.now() - stageStartedAtMs;
27 const totalMs = performance.now() - startedAtMs;
28 log(
29 'info',
30 `[startup-profile] scope=${scope} stage=${stage} ms=${elapsedMs.toFixed(1)} totalMs=${totalMs.toFixed(1)}`,
31 );
32 },
33 };
34}
35
36export function getStartupProfileNowMs(): number {
37 return performance.now();

Callers 2

startMcpServerFunction · 0.90
bootstrapServerFunction · 0.90

Calls 1

isEnabledFunction · 0.85

Tested by

no test coverage detected