summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-30 16:23:57 -0300
committerGabriel Schneider <[email protected]>2026-10-30 19:37:50 -0300
commita50c7a6ebe1f877ed4bcda71d6843ffd8a1eba2d (patch)
treec5331240d3fac388a79ab56a5117045da89c3d93
parentd0b0c6ba0fb06ad4132b395b3bf9b18072638c33 (diff)
downloadpardes-a50c7a6ebe1f877ed4bcda71d6843ffd8a1eba2d.tar.gz
pardes-a50c7a6ebe1f877ed4bcda71d6843ffd8a1eba2d.zip
test/soak.py instant: an input shown within two frames is at once at a short round trip too (a window's software present takes up to a frame); the shell's predicted echo counted over its letters, not the link's keys (its Ctrl-U is never predicted)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
-rw-r--r--test/soak.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/soak.py b/test/soak.py
index efe45b53..191408b0 100644
--- a/test/soak.py
+++ b/test/soak.py
@@ -1679,7 +1679,9 @@ def instant(args):
events = INSTANT_N * (2 if cls[0] == 'move_click' else 1)
# At once: no stop, and shown sooner than a round trip could
# bring it (an input queued behind a stopped one says nothing).
- quick = sum(1 for x in lat if x < max(rtt / 2, 10)) if rtt else len(lat)
+ # (Half a round trip, or two frames: a window's software present
+ # alone takes up to a frame or so.)
+ quick = sum(1 for x in lat if x < max(rtt / 2, 2000 / 60)) if rtt else len(lat)
frac = min(1 - stops / events, quick / INSTANT_N)
results.append((run.cell, kind, cls, frac, stops, quick, pct(lat, 50), pct(lat, 99), missed,
pct(base.get((kind, cls[0]), []), 99), died, echo))
@@ -1713,8 +1715,10 @@ def instant(args):
if name == 'type_shell':
if not echo or echo[1] == 0:
run.breach(f'{kind} {name}: no key\'s echo predicted or counted')
- elif echo[0] / echo[1] < 0.95:
- run.breach(f'{kind} {name}: {echo[0]} of {echo[1]} keys\' echo predicted (want >= 95%)')
+ elif echo[0] / INSTANT_N < 0.95:
+ # Of the class's letters (the link's count also has its Ctrl-U,
+ # which is never predicted).
+ run.breach(f'{kind} {name}: {echo[0]} of its {INSTANT_N} letters\' echo predicted (want >= 95%)')
breaches = [(x.cell, b) for x in runs for b in x.breaches]
for cell, b in breaches:
print(f'BREACH {cell}: {b}')