MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / summarizeLongTasks

Function summarizeLongTasks

tooling/scripts/perf-desktop-runtime.mjs:444–451  ·  view source on GitHub ↗
(longTasks)

Source from the content-addressed store, hash-verified

442}
443
444function summarizeLongTasks(longTasks) {
445 const durations = longTasks.map((task) => task.duration)
446 return {
447 count: longTasks.length,
448 maxMs: round(Math.max(0, ...durations)),
449 p95Ms: round(percentile(durations, 95))
450 }
451}
452
453function sampleWindow(sample, timeOrigin) {
454 if (!sample || typeof sample.at !== 'number' || typeof sample.durationMs !== 'number') {

Callers 1

mainFunction · 0.70

Calls 2

roundFunction · 0.70
percentileFunction · 0.70

Tested by

no test coverage detected