Nx
Enterprise
Nx
fix(core): establish cpu baseline when possible to improve measurement accuracy (#34120) ## Current Behavior New task processes show 0% CPU on their first measurement because no baseline exists. Accurate readings only appear on the second collection cycle (~1s later). ## Expected Behavior New task processes get accurate CPU readings on their first measurement. The collector establishes CPU baselines for newly registered processes ~250ms before collection, giving `sysinfo` enough time to calculate accurate CPU deltas. ## Technical Details: Baselining & Collection Flow The collection loop runs in 4 phases: ``` T=0ms T=750ms T=1000ms T=1750ms T=2000ms | | | | | v v v v v Collect → Sleep(750ms) → Baseline → Sleep(250ms) → Collect → ... ``` 1. **Collect**: Refresh all processes and gather metrics 2. **Post-collection sleep**: Wait until baseline time (interval - 250ms) 3. **Baseline**: Bulk CPU refresh for newly registered PIDs (if any) 4. **Pre-collection sleep**: Wait 250ms for accurate CPU delta calculation
nx-cloud record -- nx format:check
Sign in / Sign up
Open main menu
Succeeded
CI Pipeline Execution
nx-cloud record -- nx format:check
Click to copy
Linux
4 CPU cores
6bb82c0c
master