mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-27 06:43:19 +08:00
Node creates monitorEventLoopDelay's histogram with a lowest discernible value of 1000 ns, so an empty histogram's percentile() returns 511, the highest value its first bucket holds. The runtime returned 0. 6397-event-loop-metrics.ts now skips a sampling window that has no recorded delta. A delta needs two samples after reset(), and a loop that wakes late runs only one sample in a window, so on a loaded machine the program printed an empty window under Node and compiled alike. The program also prints percentile(50) after each reset.