()
| 512 | * is 0 when the device lacks TIMESTAMP_QUERY. |
| 513 | */ |
| 514 | export function getProfilerFrameHistory(): { cpuUs: number, gpuUs: number }[] { |
| 515 | const raw = bloom_profiler_frame_history(); |
| 516 | if (!raw || raw.length === 0) return []; |
| 517 | const out: { cpuUs: number, gpuUs: number }[] = []; |
| 518 | const lines = raw.split('\n'); |
| 519 | for (let i = 0; i < lines.length; i++) { |
| 520 | const line = lines[i]; |
| 521 | if (line.length === 0) continue; |
| 522 | const parts = line.split('|'); |
| 523 | if (parts.length < 2) continue; |
| 524 | out.push({ cpuUs: parseFloat(parts[0]), gpuUs: parseFloat(parts[1]) }); |
| 525 | } |
| 526 | return out; |
| 527 | } |
| 528 | |
| 529 | // Timing |
| 530 |
nothing calls this directly
no test coverage detected