mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-04 07:47:27 +01:00
fix(pregate): a failed CPU read waits for the next sample; docs wording (fix-check)
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
bd5b954b27
commit
35ef08d497
2 files changed
+3
-5
No files matched your search
+1
-1
@@ -448,7 +448,7 @@ test-tier command:
|
||||
runner. Other runners (node --test, vitest, jest, pytest, playwright test, flutter test, dart test, cargo test) get heartbeats
|
||||
only. A heartbeat follows each 60 s with no progress line;
|
||||
- is killed as **stalled** when its log does not grow and its process group
|
||||
uses no CPU for the stall timeout (`--stall-timeout <s>`, else
|
||||
stays under a tenth of one CPU for the stall timeout (`--stall-timeout <s>`, else
|
||||
`stall_timeout_s`, else 300; `0` disables): the check is `incomplete` with
|
||||
`PREGATE_STALLED` and names the last file started; the next serial file
|
||||
still runs. The group counts as busy when its CPU time, sampled each second,
|
||||
|
||||
@@ -220,10 +220,8 @@ export function supervise(o: SuperviseOptions): Promise<Supervised> {
|
||||
if (now >= o.deadline) { stop('timeout'); return; }
|
||||
if (o.stallMs > 0 && process.platform !== 'win32' && now - cpu.at >= CPU_SAMPLE_MS) {
|
||||
const used = groupCpuMs(child.pid!);
|
||||
if (used !== null) {
|
||||
if (used - cpu.ms >= CPU_BUSY_SHARE * (now - cpu.at)) lastBusy = now;
|
||||
cpu = { at: now, ms: used };
|
||||
}
|
||||
if (used !== null && used - cpu.ms >= CPU_BUSY_SHARE * (now - cpu.at)) lastBusy = now;
|
||||
cpu = { at: now, ms: used ?? cpu.ms };
|
||||
}
|
||||
if (o.stallMs > 0 && now - Math.max(lastGrowth, lastBusy) >= o.stallMs) { stop('stalled'); return; }
|
||||
if (now - lastProgress < heartbeatMs) return;
|
||||
|
||||
Reference in new issue
Block a user