mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 19:39:57 -04:00
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:
@@ -67,6 +67,7 @@ static RtssState S = RTSS_STATE_INIT; // the worker's decisions (rtss_decide.h
|
||||
static int has_denominator; // this RTSS knows FramerateLimitDenominator
|
||||
static int had_profile; // the profile existed before this run changed it
|
||||
static DWORD old_limit, old_denominator = 1;
|
||||
static int creations, removals; // the profile's "created" and "removed" lines this run, numbered for the log (under lock)
|
||||
|
||||
// RTSS's shared memory as rtss_parse reads it: whether RTSS runs, whether it lists this process, and its frame count.
|
||||
static void rtss_map(RtssApp *a) {
|
||||
@@ -170,8 +171,9 @@ static int apply(void *ctx, int64_t mhz, int first, int clear) {
|
||||
return RTSS_WROTE_READONLY;
|
||||
}
|
||||
if (first) {
|
||||
if (!had_profile)
|
||||
rt_log("frame rate: RivaTuner Statistics Server profile %s created; it goes away when the game closes", profile);
|
||||
if (!had_profile) // numbered: a want that flips between a limit and kept out creates it again at each flip
|
||||
rt_log("frame rate: RivaTuner Statistics Server profile %s created; it goes away when the game closes "
|
||||
"(creation %d this run)", profile, ++creations);
|
||||
else
|
||||
rt_log("frame rate: RivaTuner Statistics Server profile %s held a limit of %lu/%lu; it gets that back when the "
|
||||
"game closes", profile, old_limit, old_denominator);
|
||||
@@ -198,7 +200,8 @@ static int apply(void *ctx, int64_t mhz, int first, int clear) {
|
||||
static void put_back(void) {
|
||||
if (!had_profile) {
|
||||
delete_profile(profile);
|
||||
rt_log("frame rate: RivaTuner Statistics Server profile %s removed, as before the game started", profile);
|
||||
rt_log("frame rate: RivaTuner Statistics Server profile %s removed, as before the game started (removal %d this "
|
||||
"run)", profile, ++removals);
|
||||
} else if (write_limit(old_limit, old_denominator) > 0) {
|
||||
rt_log("frame rate: RivaTuner Statistics Server profile %s has its limit of %lu/%lu back", profile, old_limit,
|
||||
old_denominator);
|
||||
|
||||
Reference in New Issue
Block a user