PRTT - Performance Regression Testing Toolkit
PRTT makes Unreal performance testing repeatable: record a gameplay path once, then replay it across builds to catch regressions.
Instead of “fly around and eyeball FPS”, you get a consistent player path and camera view every run.
PRTT is designed for single-player style flows and integrates cleanly with CI via packaged builds and ExecCmds.
Features
- Repeatable replays: Record a movement/camera path in PIE and replay it consistently across runs and builds.
- Unreal Insights ready: Every test run captures a
.utracefile for deep CPU/GPU analysis. - Editor UI: Dedicated PRTT window for start/stop recording and replay, with automatic asset discovery.
- CI integration:
prtt.TestCaseStartCIlets packaged builds auto-run a test case and exit for automation.
Table of Contents
- Quick Start
- Trace Setup
- Recording Test Cases
- Testing in Packaged Builds
- Console Commands
- CI Integration
- How It Works
- Security
- Limitations
- Troubleshooting
- Support
Quick Start
- Record: Create test cases in Play-In-Editor (PIE) using the editor tool
- Package: Build your game in Test/Development configuration
- Test: Run test cases in packaged builds and analyze the resulting traces in Unreal Insights
Verify setup
After setup, PRTT recording assets under /Game/PRTT/Recordings/ will:
- Be discovered at runtime via AssetRegistry
- Be cooked into Development/Test builds by the plugin’s cook configuration
- Be available at runtime via PRTT console commands
In edge cases where assets still don’t appear in packaged builds (see Troubleshooting), you can fall back to explicitly referencing them via a DataAsset.
Trace Setup
PRTT captures utraces during replay via Trace.File. PRTT does not automatically enable trace channels. For meaningful Unreal Insights analysis, enable trace channels before starting a replay. PRTT will warn (PRTT: Failed to start utrace capture) if Trace.File fails.
Minimal recommended trace channels: CPU, GPU, LoadTime.
In editor: Open the Trace tab (bottom of editor, next to Output Log) → Channels (in Trace Data) → enable Cpu, Gpu, and LoadTime in the dropdown.
Packaged builds (recommended flags):
- For basic tracing needed by PRTT, you can still use:
-trace=cpu,gpu,loadtime
- For CI/perf runs with richer data (recommended):
-trace=cpu,gpu,frame,bookmark,log,loadtime,file-statnamedevents
If Trace.File fails, ensure your build includes trace support. See Unreal Insights Reference for command-line options.
Recording Test Cases
Recommended: Using the Editor Tool
The easiest way to record and manage test cases in PIE is using the PRTT Editor Window:
- Open your game map in the editor
- Start Play-In-Editor (PIE)
- Open the PRTT Editor Window: Tools → PRTT - Performance Regression Testing Toolkit
- In the PRTT window:
- Click Start Recording
- Play your test scenario
- Click Stop Recording when done
- The recording is automatically saved as a Data Asset in
/Game/PRTT/Recordings/
The editor tool provides:
- Visual list of all recorded test cases
- Easy start/stop recording controls
- Connection status to PIE
- Ability to replay test cases directly in the editor
Alternative: Using Console Commands
You can also use console commands in PIE:
-
Open your game map in the editor
-
Start Play-In-Editor (PIE)
-
Open the console (press
~) -
Start recording:
prtt.RecordStart <test_case_name>Example:
prtt.RecordStart combat_sequence_01If you don't provide a name, a timestamped name will be generated automatically.
-
Play your test scenario
-
Stop recording:
prtt.RecordStop
Verify Recording
- Open Content Browser
- Navigate to
/Game/PRTT/Recordings/ - You should see your test case asset (e.g.,
combat_sequence_01) - You can also view it in the PRTT Editor Window: Tools → PRTT
Testing in Packaged Builds
Step 1: Package Your Game
Package your game in Test or Development configuration (PRTT is disabled in Shipping builds).
Recommended: Use Test builds for performance testing (closer to Shipping than Development in most setups). Development builds include debug symbols and assertions, which can add overhead and skew results - making it harder to spot real regressions or compare fairly across builds.
You can package using:
- File > Package Project > Windows > Windows (64-bit)
- Select Test or Development configuration
- Or use UAT (Unreal Automation Tool) with your project's build scripts
Step 2: Run the Packaged Game
Launch your packaged game executable. For performance/CI runs, launch it with trace + stats flags, for example:
YourGame.exe -log -trace=cpu,gpu,frame,bookmark,log,loadtime,file -statnamedevents
Step 3: List Available Test Cases
- Open the console (press
~) - List all available test cases:
prtt.ListTestCases - You should see output like:
PRTT: Found 2 recording asset(s): - combat_sequence_01 - exploration_path_main
Step 4: Run a Test Case
-
Make sure you're on the correct map (the one used during recording)
-
Start replay:
prtt.TestCaseStart <test_case_name>Example:
prtt.TestCaseStart combat_sequence_01 -
The replay will:
- Load the recording
- Replay the exact movement path
- Capture a utrace (Unreal trace file)
Step 5: View results
After the replay completes, a utrace file is saved to:
Saved/PRTT/Utraces/
Files are named <test_case_name>_<timestamp>.utrace. Open them with Unreal Insights or other trace tools.
Console Commands
PRTT exposes several console commands for recording and replaying test cases.
All commands are prefixed with prtt. and work in both editor and packaged builds (except Shipping).
Recording Commands
| Command | Description | Usage |
|---|---|---|
prtt.RecordStart [name] | Start recording a test case | prtt.RecordStart my_test_case |
prtt.RecordStop | Stop recording and save as asset | prtt.RecordStop |
Replay Commands
| Command | Description | Usage |
|---|---|---|
prtt.TestCaseStart <name> | Start replaying a test case | prtt.TestCaseStart combat_sequence_01 |
prtt.TestCaseStop | Stop replay without finishing utrace capture | prtt.TestCaseStop |
prtt.TestCaseStartCI <name> | Start a CI-friendly test run that auto-exits the process when finished (packaged/CI runs) | prtt.TestCaseStartCI multiple_spot_light_corridor |
Utility Commands
| Command | Description | Usage |
|---|---|---|
prtt.ListTestCases | List all available test case assets | prtt.ListTestCases |
Editor-Only Commands
| Command | Description | Usage |
|---|---|---|
prtt.OpenWindow | Open the PRTT Editor Window | prtt.OpenWindow |
CI Integration
PRTT can be integrated into CI pipelines by launching a packaged build with ExecCmds and automatically exiting once a test case finishes.
It is designed to be easy to run in CI against a packaged Development/Test build.
Example CI PowerShell snippet
This example uses a packaged Test/Development build, runs a specific test case via prtt.TestCaseStartCI, and exits with the game process exit code:
# Path to your packaged Test/Development build (executable typically lives under Binaries\Win64)
$Exe = "C:\Builds\MyGame\Binaries\Win64\MyGame-Win64-Test.exe"
$Dir = Split-Path $Exe
# ExecCmds: run CI test case (game auto-exits after test via TestCaseStartCI)
$ExecCmds = 'prtt.TestCaseStartCI multiple_spot_light_corridor'
$CommandArgs = @(
"-log",
"-trace=cpu,gpu,frame,bookmark,log,loadtime,file",
"-statnamedevents",
"-ExecCmds=""$ExecCmds"""
)
$p = Start-Process -FilePath $Exe -ArgumentList $CommandArgs -PassThru -Wait -WorkingDirectory $Dir
exit $p.ExitCode
You can adapt this snippet to your own game executable, map, and test case names as needed.
How It Works
Automatic Asset Management
PRTT works automatically:
- Asset Discovery: PRTT uses AssetRegistry to discover
PRTTRecordingAssetassets at runtime - Runtime Enumeration: Assets can be listed and loaded at runtime via AssetRegistry
- Performance Measurement: Replays capture Unreal trace (
.utrace) files you can analyze in Unreal Insights
Note: For assets to be available in packaged builds, they must be cooked.
Asset cooking (easy mode)
PRTT configures the Asset Manager and cook pipeline to ensure PRTTRecordingAsset assets under /Game/PRTT/Recordings/ are included automatically in Development/Test builds (via plugin DefaultGame.ini and a cook delegate). In most cases, simply keeping your recordings in that folder is enough.
Asset Storage
- Location:
/Game/PRTT/Recordings/ - Format: Data Assets (
.uassetfiles) - Content: Player movement path, camera settings, timing data
- Naming: Use descriptive names (e.g.,
combat_sequence_01,exploration_path_main,boss_encounter_phase1)
Build Configuration Support
| Build Configuration | PRTT Support | Assets Cooked |
|---|---|---|
| Development | ✅ Yes | ✅ Yes |
| Test | ✅ Yes | ✅ Yes |
| Shipping | ❌ No | ❌ No |
Security
Disabled in Shipping builds (no runtime overhead). Test assets are not intended to ship.
Shipping Builds
- Compile-time: Code excluded via
#if UE_BUILD_SHIPPING - Runtime: Subsystem doesn't initialize in Shipping
- Assets: Test case assets are never cooked into Shipping packages
- Console commands: Not available in Shipping builds
Best Practices
- Never reference PRTT assets in Shipping-critical code
- Use Test/Development builds for performance testing
- Keep test cases in
/Game/PRTT/Recordings/(excluded from Shipping) - Verify Shipping builds don't include PRTT assets (check package size/logs)
Limitations
- Same map: Replay must run on the same map used during recording
- Same pawn/controller: Requires a compatible pawn and player controller
- Single-player focus: Optimized for single-player; multiplayer support is limited
- Trace dependencies: Utrace capture requires
Trace.File/Trace.Stop(Development/Test builds)
Troubleshooting
Problem: prtt.ListTestCases shows no assets in packaged build
Possible causes:
- Assets weren't cooked (most common)
- Assets not referenced anywhere in the project
- Assets not in
/Game/PRTT/Recordings/
Solutions:
- ✅ Ensure assets are referenced somewhere in your project (e.g., in a DataAsset) so they get cooked
- ✅ Ensure assets exist in Content Browser under
/Game/PRTT/Recordings/ - ✅ Check packaging logs for asset cooking errors
- ✅ Repackage after ensuring assets are referenced
Problem: Replay doesn't work
Possible causes:
- Wrong map loaded
- Asset not found
- Recording has no frames
Solutions:
- ✅ Load the same map used during recording
- ✅ Verify asset name is correct (case-sensitive)
- ✅ Check console for error messages
- ✅ Verify recording has frames:
prtt.ListTestCasesshould show the asset
Problem: Assets appear in editor but not in packaged build
Cause: Assets are not being cooked because they're not referenced anywhere in the project.
Solution:
- ✅ Reference assets in a DataAsset/Blueprint that's already cooked
- ✅ Or create a DataAsset that references all PRTT recording assets and ensure it's referenced in your project
Problem: Recording doesn't save
Possible causes:
- Not in PIE (Play-In-Editor)
- No pawn/player controller
- Editor-only operation
Solutions:
- ✅ Ensure you're in Play-In-Editor, not standalone game
- ✅ Verify you have a pawn/player controller in the world
- ✅ Check console for error messages
Problem: Utrace file not found
Possible causes:
- Replay didn't complete
- Output directory permissions
- Trace.File / Trace.Stop not available in your build
Solutions:
- ✅ Let replay complete fully (wait for automatic exit or completion message)
- ✅ Check
Saved/PRTT/Utraces/directory exists and is writable - ✅ Review console output for errors; ensure Trace.File started (PRTT logs the path when capture begins)
Support
For any issues or questions:
- Discord: Join the Infraction Labs server (https://discord.gg/WUynA27SHq)
- Email:
piotr@infractionlabs.com
Version: 1.0
Author: Infraction Labs
License: See LICENSE file