Daily Unreal Column #16 - abtest cheat command
Are you tired of manually switching between two different values of a certain console variable to see a difference in either visual fidelity or performance? This is a solution for you.
Whenever you are testing different values for a certain console variable or a cheat command, constantly opening a console and entering new value can become annoying. It might also become very hard due to requirement of some player input at the same time, for example, when you are walking across the map or when you are testing something in the middle of a combat. Scenario like this is perfect for abtest
cheat command.
To use it, type the name of the command and then two cheat commands or console variables with a value next to each other. See blow snippet for an example.
abtest "MeleeTrace.ShouldDebugDraw 1" "MeleeTrace.ShouldDebugDraw 0"
Typing the above command will automatically switch between these two values.
It is also possible to define how often it's supposed to execute by setting abtest.CoolDown <value>
.
After each cycle it also prints nice summary for a performance with information about chance that the difference is caused by a noise:
LogConsoleResponse: Display: 9.9753ms ( 480 samples) A = 'MeleeTrace.ShouldDrawDebug 1'
LogConsoleResponse: Display: 10.0634ms ( 520 samples) B = 'MeleeTrace.ShouldDrawDebug 0'
LogConsoleResponse: Display: A is 0.0881ms faster than B; 29% chance this is noise.
LogConsoleResponse: Display: ----------------