MCPcopy Index your code
hub / github.com/codeaashu/claude-code / loop

Function loop

web/lib/performance/metrics.ts:155–167  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

153 const onScroll = () => { scrolling = true; };
154
155 const loop = () => {
156 rafId = requestAnimationFrame(loop);
157 if (!scrolling) return;
158 frameCount++;
159 const now = performance.now();
160 if (now - lastTime >= 1000) {
161 const fps = (frameCount / (now - lastTime)) * 1000;
162 report({ name: "scroll_fps", value: fps, rating: fps >= 55 ? "good" : fps >= 30 ? "needs-improvement" : "poor" });
163 frameCount = 0;
164 lastTime = now;
165 scrolling = false;
166 }
167 };
168
169 element.addEventListener("scroll", onScroll, { passive: true });
170 rafId = requestAnimationFrame(loop);

Callers

nothing calls this directly

Calls 1

reportFunction · 0.85

Tested by

no test coverage detected