Refresh rate is honoured exactly everywhere: no list floor, sampler up to 10 s, server caches reduced to coalescing only

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Mitchell-Johnson
2026-09-18 13:32:36 -07:00
co-authored by Claude Fable 5.1
parent bbf0f2580f
commit 4b8a2b15ed
7 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ import (
const (
DefaultInterval = 2 * time.Second
MinInterval = 100 * time.Millisecond
MaxInterval = 2 * time.Second
MaxInterval = 10 * time.Second
History = 300 // samples kept; the window is History × interval (30 s at 100 ms, 10 min at 2 s)
fsEvery = 30 * time.Second // filesystem usage changes slowly and statfs on network mounts isn't free
upsEvery = 10 * time.Second // UPS daemons are an exec each; don't hammer them at fast intervals
@@ -982,7 +982,7 @@ func (c *Collector) Processes() ProcTable {
c.prevProc = map[int]procTimes{}
c.procInfo = map[int]procStatic{}
}
if now.Sub(c.procAt) < 500*time.Millisecond && c.lastTable != nil { // coalesce bursts of clients
if now.Sub(c.procAt) < 100*time.Millisecond && c.lastTable != nil { // coalesce simultaneous clients only
return *c.lastTable
}
ents, err := os.ReadDir("/proc")