MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / getProfilerOverlay

Function getProfilerOverlay

src/core/index.ts:490–507  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

488 * render one `drawText` per entry.
489 */
490export function getProfilerOverlay(): { label: string, cpuUs: number, gpuUs: number }[] {
491 const raw = bloom_profiler_overlay_text();
492 if (!raw || raw.length === 0) return [];
493 const out: { label: string, cpuUs: number, gpuUs: number }[] = [];
494 const lines = raw.split('\n');
495 for (let i = 0; i < lines.length; i++) {
496 const line = lines[i];
497 if (line.length === 0) continue;
498 const parts = line.split('|');
499 if (parts.length < 3) continue;
500 out.push({
501 label: parts[0],
502 cpuUs: parseFloat(parts[1]),
503 gpuUs: parseFloat(parts[2]),
504 });
505 }
506 return out;
507}
508
509/**
510 * Phase 8 — last ~120 frames' CPU + GPU totals, oldest first.

Callers

nothing calls this directly

Calls 2

pushMethod · 0.45

Tested by

no test coverage detected