MCPcopy Index your code
hub / github.com/anomalyco/opencode / syncInp

Function syncInp

packages/app/src/components/debug-bar.tsx:231–245  ·  view source on GitHub ↗
(at = performance.now())

Source from the content-addressed store, hash-verified

229 }
230
231 const syncInp = (at = performance.now()) => {
232 for (const [key, entry] of seen) {
233 if (at - entry.at > span) seen.delete(key)
234 }
235 let delay = 0
236 let inp = 0
237 for (const entry of seen.values()) {
238 delay = Math.max(delay, entry.delay)
239 inp = Math.max(inp, entry.dur)
240 }
241 batch(() => {
242 setState("delay", delay > 0 ? delay : undefined)
243 setState("inp", inp > 0 ? inp : undefined)
244 })
245 }
246
247 const syncHeap = () => {
248 const mem = (performance as Mem).memory

Callers 2

DebugBarFunction · 0.85
startFunction · 0.85

Calls 4

batchFunction · 0.85
setStateFunction · 0.85
deleteMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected