Report applied optimizer settings, progress and combat waits

This commit is contained in:
Ruen UI contributors 2026-11-22 11:03:32 -06:00
parent 10aa3700e3
commit fe0d3577df
11 changed files with 196 additions and 21 deletions

View File

@ -1,4 +1,4 @@
Ruen UI - ESDF key map (2026.11.22.1-beta.1)
Ruen UI - ESDF key map (2026.11.22.2-beta.1)
MOVEMENT
Q W [E] R T
@ -158,10 +158,12 @@ TIMERS AND OPTIMIZATION
/ruen swing on|off|preview
/ruen optimize [FPS] — measure/tune the current area; 60 by default, then remembers your target.
/ruen optimize [world|dungeon|raid|battleground] [FPS]
/ruen optimize pause|resume|status|restore
/ruen optimize pause|resume|status|changes|restore
/ruen bench [pause|resume|stop|status] — every-frame timings, worst hitch and 1% low.
Hardware evaluation: Ruen-Setup.exe --optimize (Windows), ./Ruen-Setup --optimize (Linux).
See docs/INSTALL.md. Keep WoW focused during measurement; pause before switching apps.
Quality changes print actual before/after values; status shows progress/waits.
/ruen optimize changes repeats the latest applied/final change summary.
World, dungeon, raid and battleground profiles learn separately. Run optimize again
in a troublesome area. Settings change outside combat; there is no idle sampling.

View File

@ -4,7 +4,7 @@ A compact, class-aware **WoW: Forever** interface with ESDF controls, English/Ru
**[Download the beta](https://scm.bstein.dev/bstein/ruen-ui/releases)** · **[Windows installation](docs/INSTALL.md)** · **[Инструкция на русском](docs/INSTALL-RU.md)** · **[Release review](docs/RELEASE-REVIEW.md)** · **[Report a problem](https://scm.bstein.dev/bstein/ruen-ui/issues)**
Choose **Ruen-UI-2026.11.22.1-beta.1.zip** under release assets, not Gitea's automatic source ZIP. No account is needed to download. The download is small; setup then retrieves the selected companion addons directly from their authors.
Choose **Ruen-UI-2026.11.22.2-beta.1.zip** under release assets, not Gitea's automatic source ZIP. No account is needed to download. The download is small; setup then retrieves the selected companion addons directly from their authors.
## Windows quick start

View File

@ -114,7 +114,7 @@ function P.Help()
say(P.Localized("/ruen meters auto|show|off: native damage/healing meter; auto shows in dungeons and raids.",
"/ruen meters auto|show|off: встроенный счётчик урона/исцеления; auto — в подземельях и рейдах."))
say(P.Localized("Alt now selects action buttons. Automatic self-cast stays on; use F1 to target yourself. Ctrl+Shift+F11 hides/shows the UI.", "Alt выбирает кнопки действий. Автовыбор себя включён; F1 — выбрать себя. Ctrl+Shift+F11 скрывает интерфейс."))
say(P.Localized("/ruen optimize [FPS]: retune this area (default 60 or your saved target). optimize pause|resume|status|restore. /ruen bench: frame times and hitches.","/ruen optimize [FPS]: настройка текущей зоны (60 или сохранённая цель). optimize pause|resume|status|restore. /ruen bench: время кадров и рывки."))
say(P.Localized("/ruen optimize [FPS]: retune this area (default 60 or your saved target). optimize pause|resume|status|changes|restore. /ruen bench: frame times and hitches.","/ruen optimize [FPS]: настройка текущей зоны (60 или сохранённая цель). optimize pause|resume|status|changes|restore. /ruen bench: время кадров и рывки."))
say(P.Localized("/ruen swing on|off|preview: thin attack timers. /ruen lock | unlock: lock or drag action and pet abilities normally outside combat.",
"/ruen swing on|off|preview: таймеры атак. /ruen unlock: свободное перемещение способностей, включая питомца, вне боя."))
say("Grave (`): autorun, added only if the key was unbound.")

View File

@ -37,6 +37,88 @@ local tiers = {
{0,0,1,1,1,0,0,0,0}, {1,0,2,2,2,1,1,0,0}, {2,1,3,3,3,2,2,1,0},
{2,1,5,5,4,3,2,1,1}, {3,2,7,6,5,3,3,2,1},
}
local settings = {
{'graphicsShadowQuality','Shadows','Тени',{'Low','Fair','Good','High','Ultra','Ultra High'}},
{'graphicsSSAO','Ambient shading','Рассеянное затенение',{'Off','Low','Good','High','Ultra'}},
{'graphicsLightMode','Lighting','Освещение',{'Fair','Good','High','Ultra'}},
{'graphicsViewDistance','View distance','Дальность видимости','distance'},
{'graphicsEnvironmentDetail','Environment detail','Детализация окружения','distance'},
{'graphicsGroundClutter','Ground clutter','Детализация земли','distance'},
{'graphicsLiquidDetail','Water','Вода',{'Low','Fair','Good','High'}},
{'graphicsPBRLiquidDetail','Modern water','Современная вода',{'Low','High','Ultra'}},
{'graphicsComputeEffects','Compute effects','Вычисляемые эффекты',{'Low','Fair','Good','High','Ultra'}},
{'graphicsProjectedTextures','Ground spell indicators','Наземные эффекты заклинаний','toggle'},
{'graphicsParticleDensity','Particle detail','Детализация частиц'},
{'graphicsSpellDensity','Spell density','Плотность заклинаний',{'Essential','Reduced','Everything'}},
{'graphicsDepthEffects','Depth effects','Эффекты глубины',{'Off','Low','Good','High'}},
{'RAIDsettingsEnabled','Native raid override','Встроенные настройки рейда','toggle'},
{'MSAAQuality','MSAA','MSAA'}, {'msaaAlphaTest','MSAA alpha test','MSAA alpha test','toggle'},
{'ffxAntiAliasingMode','Anti-aliasing mode','Режим сглаживания'},
{'vsync','VSync','Вертикальная синхронизация','toggle'},
{'useTargetFPS','Dynamic FPS control','Динамическое управление FPS','toggle'},
{'useMaxFPS','FPS limiter','Ограничение FPS','toggle'}, {'maxFPS','FPS cap','Лимит FPS'},
}
local function snapshot()
local values={}
for _,spec in ipairs(settings) do values[spec[1]]=C_CVar.GetCVar(spec[1]) end
return values
end
local function equivalent(a,b)
return a==b or (tonumber(a)~=nil and tonumber(a)==tonumber(b))
end
local function differences(before,after)
local result={}
for _,spec in ipairs(settings) do
local key=spec[1]
if not equivalent(before[key],after[key]) then
result[#result+1]={key=key,before=before[key],after=after[key]}
end
end
return result
end
local function describe(change)
local spec
for _,entry in ipairs(settings) do if entry[1]==change.key then spec=entry; break end end
local function value(v)
if v==nil then return P.Localized('unavailable','недоступно') end
local n=tonumber(v)
if spec[4]=='distance' and n then return tostring(n+1)..'/10' end
if spec[4]=='toggle' and n then return n==0 and P.Localized('off','выкл') or P.Localized('on','вкл') end
if type(spec[4])=='table' and n and spec[4][n+1] then
local text=spec[4][n+1]
local ru={Off='Выкл',Low='Низко',Fair='Удовлетворительно',Good='Хорошо',High='Высоко',
Ultra='Ультра',['Ultra High']='Максимум',Essential='Необходимые',Reduced='Меньше',Everything='Все'}
return P.Localized(text,ru[text] or text)
end
if spec[1]=='MSAAQuality' and v=='0,0' then return P.Localized('off','выкл') end
return tostring(v)
end
return P.Localized(spec[2],spec[3])..': '..value(change.before)..' → '..value(change.after)
end
local function showChanges(changes)
if #changes==0 then
say('No graphics values changed in this step.',
'На этом шаге значения графики не изменились.'); return
end
for first=1,#changes,4 do
local parts={}
for i=first,math.min(first+3,#changes) do parts[#parts+1]=describe(changes[i]) end
say(table.concat(parts,'; '))
end
end
local function showUnavailable(failures)
if failures and next(failures) then
local names={}
for _,spec in ipairs(settings) do if failures[spec[1]] then names[#names+1]=P.Localized(spec[2],spec[3]) end end
say('Unavailable/not applied: '..table.concat(names,', '),'Недоступно/не применено: '..table.concat(names,', '))
end
end
local function reportApplication(before,heading,ru,failures)
local d=db(); local changes=differences(before,snapshot())
d.lastChange={time=time(),release=P.release,mode=mode(),heading=heading,headingRU=ru,changes=changes,unavailable=failures}
say(heading,ru); showChanges(changes)
showUnavailable(failures)
end
local function write(key, value)
local before = C_CVar.GetCVar(key)
if before == nil then return false end
@ -44,12 +126,12 @@ local function write(key, value)
local ok, reason = pcall(IsGraphicsSettingValueSupported, key, value, false)
if not ok or (reason and reason ~= 0) then return false end
end
if before == tostring(value) then return true end
if equivalent(before,tostring(value)) then return true end
local d = db()
if d.original[key] == nil then d.original[key] = before end
local ok = pcall(C_CVar.SetCVar, key, tostring(value))
if not ok then return false end
return tostring(C_CVar.GetCVar(key)) == tostring(value)
return equivalent(C_CVar.GetCVar(key),tostring(value))
end
local function profile(tier)
local failures = {}
@ -79,10 +161,16 @@ local function resetSample(seconds)
end
local function applyTier(tier, phase)
local s, d = session, db()
s.tier=tier; s.phase=phase or 'search'; s.pending=nil; s.good=0
local before=snapshot()
s.tier=tier; s.phase=phase or 'search'; s.pending=nil; s.good=0; s.waitNotified=nil
s.unsupported=profile(tier)
cap(s.phase == 'validate' and d.target or math.ceil(d.target * 1.1))
resetSample(8)
reportApplication(before,
('%s %s tier %d/5; FPS cap %d%s.'):format(s.phase=='validate' and 'Verifying' or 'Testing',s.mode,tier,
s.phase=='validate' and d.target or math.ceil(d.target*1.1),s.phase=='validate' and ' (final)' or ' (temporary)'),
('%s %s, уровень %d/5; лимит FPS %d%s.'):format(s.phase=='validate' and 'Итоговая проверка' or 'Проверка',s.mode,tier,
s.phase=='validate' and d.target or math.ceil(d.target*1.1),s.phase=='validate' and ' (итоговый)' or ' (временный)'),s.unsupported)
end
local function passed(r, target, validate)
-- Tail latency and explicit hitches matter even when 99% of frames are fast.
@ -111,11 +199,21 @@ local function finish(r)
say('Some graphics controls are unavailable on this client/GPU; the result measures the settings actually accepted.',
'Некоторые настройки недоступны; результат получен с фактически применёнными значениями.')
end
reportApplication(s.before,'Final changes compared with the start of this run:',
'Итоговые изменения относительно начала этой проверки:',s.unsupported)
session=nil; f:SetScript('OnUpdate',nil)
end
local function commit()
local s = session
if not s or not s.pending or InCombatLockdown() or loading then return end
if not s or not s.pending or loading then return end
if InCombatLockdown() then
if not s.waitNotified then
say('Sample complete; waiting for combat to end before applying the next step.',
'Замер завершён; следующий шаг будет применён после окончания боя.')
s.waitNotified=true
end
return
end
if s.pending == 'finish' then finish(s.last)
else local nextStep=s.pending; applyTier(nextStep.tier,nextStep.phase) end
end
@ -123,6 +221,11 @@ local function result()
local s, d = session, db()
local r=P.FrameSampleSummary(s.sample); r.tier=s.tier; r.phase=s.phase
s.last=r; s.history[#s.history+1]=r
local pass=passed(r,d.target,s.phase=='validate')
say(('Tier %d/5 check: %s; p99 %.1f ms, worst %.1f ms, frames >100 ms: %d.'):format(
s.tier,pass and 'passed' or 'target/smoothness missed',r.p99MS or 0,r.worstMS,r.over100),
('Проверка уровня %d/5: %s; p99 %.1f мс, максимум %.1f мс, кадров >100 мс: %d.'):format(
s.tier,pass and 'пройдена' or 'цель/плавность не достигнута',r.p99MS or 0,r.worstMS,r.over100))
if s.phase == 'validate' then
if not passed(r,d.target,true) and s.tier > 1 then
s.pending={tier=s.tier-1,phase='validate'}
@ -146,7 +249,7 @@ end
local update
local function start(which)
local d=db(); local saved=d.profiles[which]
session={mode=which,tier=math.min(saved.tier or 1,2,d.ceiling),windows=0,good=0,history={}}
session={mode=which,tier=math.min(saved.tier or 1,2,d.ceiling),windows=0,good=0,history={},before=snapshot()}
applyTier(session.tier)
f:SetScript('OnUpdate',update)
say(('Optimizing %s for %d FPS: move/fight in this area for about 2–5 minutes. Keep WoW focused; /ruen optimize pause before switching apps. Changes wait for combat to end.'):format(which,d.target),
@ -156,11 +259,19 @@ local function activate()
if not running or loading then return end
if P.IsBenchmarkRunning and P.IsBenchmarkRunning() then deferredEnvironment=true; return end
deferredEnvironment=nil
if InCombatLockdown() then pendingLoad=activate; return end
if InCombatLockdown() then
if pendingLoad~=activate then say('Environment changed; waiting for combat to end before applying its graphics.',
'Зона изменилась; графика будет применена после окончания боя.') end
pendingLoad=activate; return
end
local d=db(); local which=mode(); local r=d.profiles[which]
session=nil
if r.calibrated and r.revision==2 and r.fingerprint==fingerprint() then
local before=snapshot()
profile(r.tier); cap(d.target); f:SetScript('OnUpdate',nil)
if #differences(before,snapshot())>0 then
reportApplication(before,'Applied saved '..which..' graphics.','Применён сохранённый профиль '..which..'.')
end
else start(which) end
end
update = function(_, dt)
@ -197,24 +308,41 @@ end
function P.OptimizerCommand(arg)
arg=(arg or ''):lower():match('^%s*(.-)%s*$')
local d=db()
if arg=='changes' then
local last=d.lastChange
if last then say(last.heading,last.headingRU); showChanges(last.changes); showUnavailable(last.unavailable)
else say('No recorded changes yet. This command does not start optimization.',
'Изменения ещё не записаны. Эта команда не запускает настройку.') end
return
end
if arg=='status' then
local which=mode(); local r=d.profiles[which]
say(('Optimizer: %s; %s; target %d FPS (requested %d). %s. Thermal evidence: %s.'):format(
local state=loading and 'loading' or session and (session.pending and
(InCombatLockdown() and 'waiting for combat to end' or 'applying next step') or session.warmup>0 and
('settling: '..math.ceil(session.warmup)..' seconds') or ('recording: '..math.floor(session.sample.seconds)..'/20 seconds'))
or pendingLoad and 'waiting for combat to end' or deferredEnvironment and 'waiting for benchmark'
say(('Optimizer [%s]: %s; %s; target %d FPS (requested %d). %s. Thermal evidence: %s.'):format(P.release or 'unknown',
running and 'ON' or 'OFF',which,d.target or validFPS(d.requestedFPS) or 60,
validFPS(d.requestedFPS) or 60,session and ('measuring tier '..session.tier..'/5 ('..session.phase..')')
or r.calibrated and ('saved tier '..r.tier..'/5; '..(r.metTarget and 'sample passed' or 'target NOT met')) or 'not measured',
hardware().evidence or 'not measured'))
if r.last then say(('Last sample: p99 %.1f ms; worst %.1f ms; >50/>100/>250 ms frames: %d/%d/%d.'):format(
if state then say(state) end
if d.lastChange then say('Last update: '..d.lastChange.heading..' /ruen optimize changes lists the settings.',
'Последнее изменение: '..(d.lastChange.headingRU or d.lastChange.heading)..' Список: /ruen optimize changes.') end
if r.last then say(('Last saved sample: p99 %.1f ms; worst %.1f ms; >50/>100/>250 ms frames: %d/%d/%d.'):format(
r.last.p99MS or 0,r.last.worstMS or 0,r.last.over50 or 0,r.last.over100 or 0,r.last.over250 or 0)) end
return
end
if InCombatLockdown() then say('Change optimization outside combat.','Меняйте оптимизацию вне боя.'); return end
if arg=='off' or arg=='pause' then
P.StopOptimizer(); say('Calibration paused; settled/current quality retained.','Калибровка приостановлена; текущие настройки сохранены.'); return
local before=snapshot(); P.StopOptimizer()
reportApplication(before,'Calibration paused; settled/current quality retained.','Калибровка приостановлена; текущие настройки сохранены.'); return
end
if arg=='restore' then
local before=snapshot()
P.StopOptimizer()
for key,value in pairs(d.original) do pcall(C_CVar.SetCVar,key,value) end
reportApplication(before,'Restored pre-optimization graphics:','Исходная графика восстановлена:')
RuenUIDB.optimizer=nil; say('Pre-optimization graphics restored.','Исходные настройки графики восстановлены.'); return
end
local cmd, fpsText=arg:match('^(%S+)%s+(%S+)$')
@ -222,7 +350,7 @@ function P.OptimizerCommand(arg)
if validFPS(cmd) and not fpsText then fpsText=cmd; cmd='' end
local fps=fpsText and validFPS(fpsText)
if (fpsText and not fps) or (cmd~='' and cmd~='start' and cmd~='resume' and not d.profiles[cmd]) then
say('/ruen optimize [20–240 FPS] | world|dungeon|raid|battleground [FPS] | pause|resume|status|restore'); return
say('/ruen optimize [20–240 FPS] | world|dungeon|raid|battleground [FPS] | pause|resume|status|changes|restore'); return
end
if P.IsBenchmarkRunning and P.IsBenchmarkRunning() then
say('Finish the benchmark or /ruen bench stop before changing graphics.','Завершите замер или /ruen bench stop перед настройкой графики.'); return

View File

@ -1,6 +1,6 @@
local _, P = ...
P.version = 5
P.release = "2026.11.22.1-beta.1"
P.release = "2026.11.22.2-beta.1"
P.graphicsVersion = 2
P.layoutName = "Ruen UI - Clear ESDF"
function P.IsOurLayout(layout)

View File

@ -1,7 +1,7 @@
## Interface: 16001
## Title: Ruen UI
## Notes: ESDF, mouse and menu controls, inventory layout and Spoken language controls. /ruen help
## Version: 2026.11.22.1-beta.1
## Version: 2026.11.22.2-beta.1
## Author: Ruen UI contributors
## SavedVariables: RuenUIDB
## SavedVariablesPerCharacter: RuenUICharacter

View File

@ -1,7 +1,7 @@
# Установка Ruen UI — бета
1. Установите **WoW: Forever** через Battle.net и дождитесь окончания загрузки.
2. Откройте [Releases](https://scm.bstein.dev/bstein/ruen-ui/releases) и скачайте **Ruen-UI-2026.11.22.1-beta.1.zip**. Для скачивания регистрация не нужна.
2. Откройте [Releases](https://scm.bstein.dev/bstein/ruen-ui/releases) и скачайте **Ruen-UI-2026.11.22.2-beta.1.zip**. Для скачивания регистрация не нужна.
3. Полностью распакуйте ZIP. Закройте WoW.
4. Для русского варианта запустите **Install-Russian.cmd**. Обычная установка: **Ruen-Setup.exe**. Установщик сам ищет игру; если нужно, укажите папку `_forever_`, в которой находится `Wow.exe`.
5. В Battle.net выберите WoW: Forever → шестерёнка → изменение установки. Установите английские и русские файлы игры. Выберите русский язык текста и речи в настройках **игры**, а не приложения Battle.net. Дождитесь 100% загрузки.
@ -46,3 +46,6 @@
`/ruen optimize status` — состояние; `pause` — остановить измерение; `resume` — продолжить работу профилей; `restore` — вернуть исходную графику. Перед переключением в другое приложение используйте `pause`: активность окна автоматически не определяется.
После настройки `/ruen bench` записывает каждый игровой кадр за три минуты: средний FPS, 1% low, p99, максимальную задержку и количество кадров дольше 50/100/250 мс. Загрузочные экраны исключаются, реальные многосекундные рывки учитываются. `/ruen bench pause|resume|stop|status` управляет замером; `stop` сохраняет неполный результат. Одновременная настройка графики и замер запрещены. Последние пять отчётов сохраняются при выходе или `/reload`. Старые секундные выборки FPS нельзя напрямую сравнивать с новыми процентилями кадров.
Оптимизатор теперь выводит фактические значения «до → после» при изменении настроек, результат каждого 20-секундного замера и однократное сообщение об ожидании окончания боя. Временный лимит FPS помечается отдельно. Итоговый список сравнивается с началом запуска; если значения не изменились, это указано явно. `/ruen optimize changes` повторяет последний список, `/ruen optimize status` показывает версию, ход замера и причину ожидания.

View File

@ -70,7 +70,8 @@ Calibration usually takes 2–5 minutes of gameplay (up to roughly seven if seve
The presets include shadows, ambient shading, secondary lighting, water, compute effects, visibility and scenery detail. Essential spell effects/projected textures remain enabled; render scale, texture resolution, UI geometry and GPU/API/driver selection are retained. The optimizer uses no per-frame loop after settling. It does not change fans, voltages or drivers. Shader compilation, asset streaming, other software, network stalls and overheating may require investigation outside graphics settings.
- `/ruen optimize status`: current environment, target, phase/saved tier and last frame evidence.
- `/ruen optimize status`: running release, environment, target, phase/saved tier, seconds recorded in the current window and any wait for combat/loading/benchmark.
- `/ruen optimize changes`: repeat the latest before/after summary. Each applied test prints real read-back changes, labels temporary FPS caps, and lists unavailable/rejected controls. Each 20-second check reports its result; waiting for combat is announced once. The final summary compares settings with the start of that run, excluding temporary changes that were undone. A step with no changes says so explicitly.
- `/ruen optimize pause`: stop measuring and retain the current/best tested settings; use this **before switching apps**.
- `/ruen optimize resume`: enable environment profiles and finish an unmeasured profile.
- `/ruen optimize restore`: stop calibration and restore the graphics values saved before optimization.

View File

@ -1,9 +1,11 @@
# Release review — 2026.11.22.1-beta.1
# Release review — 2026.11.22.2-beta.1
Reviewed 22 November 2026. **Opt-in public beta; not a general-availability certification.** This follow-up records every gameplay frame during manual benchmarking and retunes graphics on demand in the current scene. It retains the user-confirmed beta8 pet highlight fix and coordinated layout/profile work. Automated evidence does not establish that this update fixes the user's live cave stutter; that comparison is pending.
Reviewed 22 November 2026. **Opt-in public beta; not a general-availability certification.** This follow-up adds actual before/after graphics feedback, bounded progress messages, explicit combat waits and a read-only `optimize changes` command to the preceding frame-timing/scene-optimization beta. It retains the user-confirmed beta8 pet highlight fix and coordinated layout/profile work. Automated evidence does not establish that this update fixes the user's live cave stutter; that comparison is pending.
## Frame timing and scene optimization
- Setting changes are derived from CVar read-back snapshots; rejected writes are not reported as applied. Temporary trial caps are labeled. Final summaries compare against run-start values, with no-change cases explicit. Status includes the running release and progress/wait state. Progress is emitted only at measurement boundaries; combat waits are announced once, not per frame. Regression checks cover these distinctions and report commands perform no writes.
- Manual benchmarking records bounded 0.25 ms frame histograms, true frames/elapsed-time average, mean slowest-1% FPS, p99, worst duration, and explicit >50/100/250 ms frame counts. Sparse hitches remain visible even when smoothed FPS and p99 look healthy. Only known loading is excluded; >2-second gameplay stalls no longer disappear.
- The optimizer accepts an in-game FPS target and retests the current environment. Dungeon and battleground profiles are now separate from world/raid profiles. It explicitly owns the active base settings, disabling native raid overrides, and includes cave-relevant secondary lighting plus PBR water controls omitted by the old tuner.
- Five quality presets, two passing 20-second windows before upgrades, up to ten search windows plus bounded capped validation. Final checks include explicit hitch counts. Persistent stalls at the minimum tier are reported as unmet; the search cannot guarantee an optimal setting combination or solve all external causes.

View File

@ -7,7 +7,7 @@ from pathlib import Path
import zipfile
ROOT = Path(__file__).resolve().parents[1]
VERSION = '2026.11.22.1-beta.1'
VERSION = '2026.11.22.2-beta.1'
FILES = ['Ruen-Setup', 'Ruen-Setup.exe', 'Install-Ruen-UI.ps1', 'Install-Ruen-UI.cmd',
'Install-Ruen-UI-Russian.cmd', 'Install-Windows.cmd', 'Install-Russian.cmd',
'Optimize-Ruen-UI.ps1', 'dependencies.lock.json', 'README.md', 'LICENSE',

View File

@ -120,3 +120,42 @@ P.IsBenchmarkRunning=nil;P.OptimizerBenchmarkEnded()
assert(P.IsOptimizerCalibrating() and writes>before)
frames(33*600,1/33);P.OptimizerCommand('pause')
print('PASS: deferred environment handoff resumes after read-only benchmark')
-- Feedback is based on read-back differences, not attempted writes. Progress
-- appears at window boundaries, and waiting notices cannot spam each frame.
local oldPrint=print;local messages={}
print=function(message)messages[#messages+1]=message end
local function contains(text)
for _,message in ipairs(messages)do if message:find(text,1,true)then return true end end
end
local function changesHave(key)
for _,change in ipairs(d.lastChange.changes)do if change.key==key then return change end end
end
P.hardwareProfile={};where='none'
IsGraphicsSettingValueSupported=function()return 0 end
local realSet=C_CVar.SetCVar
C_CVar.SetCVar=function(k,v)if k~='graphicsSSAO' then realSet(k,v) end end
cvars.graphicsShadowQuality='4';cvars.graphicsSSAO='2';cvars.maxFPS='60'
P.OptimizerCommand('60')
assert(changesHave('graphicsShadowQuality').before=='4')
assert(changesHave('maxFPS').after=='66' and contains('(temporary)'))
assert(not changesHave('graphicsSSAO') and d.lastChange.unavailable.graphicsSSAO,'rejected write described as applied')
assert(contains('Unavailable/not applied: Ambient shading'))
C_CVar.SetCVar=realSet
combat=true;frames(66*60,1/66)
assert(contains('waiting for combat to end'))
local count=#messages;frames(66*60,1/66)
assert(#messages==count,'waiting notice repeated every frame')
P.OptimizerCommand('status');assert(contains('waiting for combat to end'))
combat=false;f.scripts.OnEvent(f,'PLAYER_REGEN_ENABLED');frames(66*600,1/66)
assert(d.lastChange.heading=='Final changes compared with the start of this run:')
assert(d.lastChange.mode=='world' and changesHave('graphicsShadowQuality').after==cvars.graphicsShadowQuality)
assert(not changesHave('maxFPS'),'final summary included temporary trial cap')
before=writes;P.OptimizerCommand('changes');P.OptimizerCommand('status')
assert(writes==before,'report commands changed graphics')
count=#messages;frames(66*120,1/66);assert(#messages==count and not f.scripts.OnUpdate)
-- Resume identical saved values must not invent a change or flood chat.
P.OptimizerCommand('resume');assert(#messages==count)
P.OptimizerCommand('pause');assert(contains('No graphics values changed in this step.'))
print=oldPrint
print('PASS: real before/after values, rejected writes excluded, temporary/final distinction, net-run summary, bounded progress/wait notices and read-only status/changes')