Files
Pulse/internal/monitoring
rcourtman b447133ea9 Measure snapshot detail copies per call, not averaged counts
TestSnapshotGuestReadDoesNotCopyUnusedDetails failed the required
Backend tests (rest-1) job on main and on unrelated pull requests. CI
runs it under -race, where sync.Pool drops a quarter of the values put
into it, so every fmt call in the poll can miss its printer cache. Per
call object counts then spread from about 343 to 415, and the guard
compared the minimum of four testing.AllocsPerRun(5) averages against a
+4 bound. On pulse-dev under -race and CPU load the old guard failed
17 of 100 runs.

Measure each poll call on its own, with one P, the collector paused and
no memory limit. Grow the detailed fixture to 256 entries per guest, so
any per-detail copy dwarfs the fixed noise. A copy on every call must
move the minimum or median bytes by 4 KiB, or the median object count
by 32; a copy on any one call must move the maximum bytes by 16 KiB.
Over 200 race runs the fixtures differed by at most 1.7 KiB and 15
objects.

Positive controls now cover one address list per guest, the same copy
on a single call (only the peak bound may see it), and converting
every guest.

On pulse-dev with CPU load the new guard passed 200 of 200 runs under
-race and 100 of 100 without it. It failed every run with each of four
regressions put back into pollGuestSnapshots: converting every guest,
one address list per guest, that list on every seventh poll, and one
guest's 256 cloned address strings.
2026-11-14 12:49:14 +00:00
..
2026-03-18 16:06:30 +00:00
2026-07-11 18:25:17 +01:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00