Repository navigation
feat(node,trackers): event_loop_utilization in percent; gc as a system event (C15, C16) - #100
Conversation
…m event (C15, C16)
C16: event_loop_utilization goes on the wire as percent 0-100 (one decimal); the tracker utilization stage payload is { utilizationPercent }.
C15: the gc_count/gc_pause_ms/gc_pause_max_ms traces are retired; the node events source emits a gc event {count, pauseMs, maxPauseMs} per interval with GC activity, lazily subscribed to the shared ProcessTracker gc stage. The tracker no longer keeps its sampling timer alive for a stage the runtime cannot answer.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
Claude finished @krassx's task in 57s —— View job Review of PR #100 (C15 / C16: ELU in percent,
|
Also drops the stale second orientationToWire argument in browser/system-events (main's #97 and #98 disagreed on the signature, so main's browser typecheck/build failed). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
Claude finished @krassx's task in 43s —— View job Re-review of PR #100 (C15 / C16: ELU in percent,
|
Rewrite the changesets (unreleased: no breaking note, drop the stale gc-traces one), round gc pauses to 3 decimals, omit invalid injected ELU readings, document the shared timer, and close the test gaps for gated stages, Bun/Deno and launch onError wiring. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
Claude finished @krassx's task in 28s —— View job Re-review of PR #100 (C15 / C16: ELU in percent,
|
Eight trace producers remain (gc moved to events, available-memory folded into ram_system_free). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
Claude finished @krassx's task in 26s —— View job Re-review of PR #100 (C15 / C16: ELU in percent,
|
Summary
event_loop_utilizationis now PERCENT 0-100, one decimal (round(x*1000)/10), likecpu_usage_process.createGuardedEluconverts perf_hooks' fraction; the trackerutilizationstage payload is{ utilizationPercent }; omit-never-zero is unchanged (Bun/Deno still omit on idle+active both 0). Breaking value change (beta).gc_count/gc_pause_ms/gc_pause_max_mstraces are retired. GC is thegcevents.systemevent, params{count, pauseMs, maxPauseMs}, one per 1 s interval with at least one collection, nothing for a quiet interval. Node and Electron main only; Bun/Deno keepmeasuresGc:false(blind observer) and never emit it.createNodeSystemEventsSource(proc, { processTracker, onError }), wired inlaunch()) subscribes to the shared tracker'sgcstage lazily (first event subscriber), releases on stop, attaches nothing withcaptureSystemEvents:false. The tracker still owns the single observer and arms it only while agclistener exists, so there is no second observer.gcpasses through once, untouched, with no extra subscription.gcevent they can never emit.captureSystemTraces:falsealone no longer means timer-free (needscaptureSystemEvents:falsetoo).Test plan
pnpm ci:localgreen (lint, typecheck, cycles, per-package coverage gate, harness unit).gc,captureSystemEvents:falsenever arms the observer, stop releases), electron mux pass-through, trace-producers (no gc traces, no observer), guarded ELU percent/rounding.🤖 Generated with Claude Code