H17: Sample soak client memory at the results of a match decided in the drop
The R5 gate's soak failed its client leak check: match 0 was decided during the drop (23 eliminations as the clients landed) and never reached play, which is the only phase soak_clients sampled memory in, so each client process had one sample instead of two. Hashes, tick timing and server memory all passed. A match that never reaches play is now sampled at its results, and the memory line says which phase it was taken in. The rule is a static function, SoakClients.samples_memory_in, covered by a new test. A results sample can sit a little above a play sample, so a run that samples match 0 at its results is slightly lenient on growth from it. Closes #86 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
extends TestCase
|
||||
|
||||
## R5: the soak samples each client process's memory once a match. A match can be
|
||||
## decided during the drop (test_match covers that) and never reach play, so such a
|
||||
## match is sampled at its results; otherwise the soak's leak check had too few samples.
|
||||
|
||||
const SoakClients: GDScript = preload("res://tools/soak_clients.gd")
|
||||
|
||||
|
||||
func test_memory_is_sampled_in_play_and_at_results() -> void:
|
||||
assert_true(SoakClients.samples_memory_in(Match.PLAY))
|
||||
assert_true(SoakClients.samples_memory_in(Match.RESULTS), "a match decided during the drop")
|
||||
|
||||
|
||||
func test_memory_is_not_sampled_before_play() -> void:
|
||||
for phase: int in [Match.LOBBY, Match.COUNTDOWN, Match.DROP]:
|
||||
assert_false(SoakClients.samples_memory_in(phase), Match.PHASE_NAMES[phase])
|
||||
@@ -0,0 +1 @@
|
||||
uid://clerstsk6qkiw
|
||||
Reference in New Issue
Block a user