re: cheap probe verified; its one "arrival" is flicker
First run of wave7_probe: zero stalled samples across the whole run, against three consecutive heavy-probe runs that stalled at roughly 27, 83 and 255 s. The fix works. The guest is also visibly healthier -- 19 losses against 8 in a heavy-probe run of comparable length -- so starving the emulator had been suppressing the very activity the probe existed to watch. It also reported the first arrival of the whole line of work, and that arrival does not survive inspection. A record went 1 -> 0 at t=229, 0 -> 2 at t=259 and 2 -> 0 at t=274. Two craft appearing and vanishing within fifteen seconds is not a wave. The same log contains the giveaway: at t=60 a record read 13 and at t=75 the same record read 14, an increase, with nothing printed, because the probe only surfaced decreases. The hull-based liveness read flickers, and a flicker that straddles zero was indistinguishable from an arrival under the old rule. The count therefore stands at zero confirmed arrivals in eleven runs. Two changes, neither yet exercised: every increase is printed rather than only those from zero, and an increase from zero counts only if it persists across two consecutive samples, with a candidate that returns to zero discarded as flicker. Recorded because it was close: under the old rule this run would have been written up as "first arrival observed", which would have been the strongest-looking result so far and wrong.
This commit is contained in:
@@ -89,6 +89,7 @@ def main():
|
||||
print('t= 0s deployed=%d strengths %s'
|
||||
% (len(prev), sorted(collections.Counter(prev.values()).items())), flush=True)
|
||||
t0 = time.time(); last_rescan = t0; arr = los = 0; stalls = 0
|
||||
pending, confirmed = {}, 0
|
||||
while time.time() - t0 < secs:
|
||||
time.sleep(every)
|
||||
el = round(time.time() - t0)
|
||||
@@ -100,15 +101,32 @@ def main():
|
||||
now = struct.unpack('>I', os.pread(fd, 4, tick))[0]
|
||||
if now <= last_tick: st = ' *** GUEST STALLED ***'; stalls += 1
|
||||
last_tick = now
|
||||
a_ = [(o, cur[o]) for o in cur if prev.get(o, 0) == 0 < cur[o]]
|
||||
# Report EVERY increase, not just 0 -> n. The first run logged a record
|
||||
# reading 13 then 14 with no event printed, which is how flicker in the
|
||||
# hull-based liveness read hides: only decreases were being surfaced, so
|
||||
# a spurious 0 -> 2 looked like an arrival while 13 -> 14 looked like
|
||||
# nothing. An arrival must also PERSIST to count.
|
||||
a_ = [(o, prev.get(o, 0), cur[o]) for o in cur if cur[o] > prev.get(o, 0)]
|
||||
l_ = [(o, prev[o], cur.get(o, 0)) for o in prev if cur.get(o, 0) < prev[o]]
|
||||
arr += len(a_); los += len(l_)
|
||||
print('t=%4ds deployed=%d ARRIVALS=%d losses=%d (cum %d/%d)%s'
|
||||
% (el, len(cur), len(a_), len(l_), arr, los, st), flush=True)
|
||||
for o, c in a_: print(' ARRIVAL %-30s 0 -> %d' % (label.get(o, '?'), c), flush=True)
|
||||
for o, x, y in a_:
|
||||
if x == 0: pending[o] = pending.get(o, 0) + 1
|
||||
for o in list(pending):
|
||||
if cur.get(o, 0) == 0: pending.pop(o, None) # vanished: flicker
|
||||
elif pending[o] == 2:
|
||||
confirmed += 1
|
||||
print(' *** CONFIRMED ARRIVAL %-26s now %d (persisted 2 samples)'
|
||||
% (label.get(o, '?'), cur[o]), flush=True)
|
||||
pending[o] = 3
|
||||
arr += sum(1 for x in a_ if x[1] == 0); los += len(l_)
|
||||
print('t=%4ds deployed=%d up=%d down=%d (cum up %d / down %d, confirmed %d)%s'
|
||||
% (el, len(cur), len(a_), len(l_), arr, los, confirmed, st), flush=True)
|
||||
for o, x, y in a_:
|
||||
print(' up %-30s %d -> %d%s' % (label.get(o, '?'), x, y,
|
||||
' <- candidate arrival' if x == 0 else ''), flush=True)
|
||||
for o, x, y in l_: print(' loss %-30s %d -> %d' % (label.get(o, '?'), x, y), flush=True)
|
||||
prev = cur
|
||||
print('\nTOTAL arrivals=%d losses=%d stalled samples=%d' % (arr, los, stalls))
|
||||
print('\nTOTAL candidate-up=%d down=%d CONFIRMED arrivals=%d stalled samples=%d'
|
||||
% (arr, los, confirmed, stalls))
|
||||
return 0
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user