Number RivaTuner Statistics Server's profile created and removed lines, so a play-test can count the churn.

The review found that numbering these lines had been set aside as the performance branch's work, while it is the part
of A-10 that may land on its own, and only this branch writes rtss_limit.c. A want that flips between a limit and kept
out (low latency before the first swapchain and during a rebuild, or switched in the menu) creates the profile and
removes it again at each flip; the play-test's live toggles item counts those lines. rtss_limit.c apply now ends the
created line with "(creation N this run)" and put_back the removed line with "(removal N this run)", counted under the
lock both run under. The settle rule that would stop the churn still waits for approval.

tests/rtss_worker_check.c churn_run also checks that the ten flips log creations 1 to 6 and removals 1 to 5 and no
more. rtss_limit_check passes 24 of 24.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-13 17:48:51 -05:00
parent 3b250adffd
commit 9c32d3bca9
2 changed files with 13 additions and 4 deletions

View File

@@ -637,7 +637,7 @@ static void library_run(void) {
}
// Low latency switching on and off at every poll (the want flips between a limit and kept out): each switch writes or
// puts back the profile, as it stands.
// puts back the profile, as it stands, and the log numbers each creation and removal so a play-test can count them.
static void churn_run(void) {
app_set(1, 0xA, 1000, 2000, 60);
ask(60000);
@@ -648,6 +648,12 @@ static void churn_run(void) {
}
show("ten polls with the want flipping");
CHECK(created == 6 && removed == 5, "%ld creations, %ld removals", created, removed);
CHECK(logged("created; it goes away when the game closes (creation 1 this run)\n") &&
logged("(creation 6 this run)\n") && !logged("(creation 7"),
"the created lines are numbered");
CHECK(logged("removed, as before the game started (removal 1 this run)\n") && logged("(removal 5 this run)\n") &&
!logged("(removal 6"),
"the removed lines are numbered");
CHECK(rtss_limit_active(), "RTSS limits after the last want of a limit");
}