In this lesson, you will learn how to define a quantifiable performance baseline to serve as the ground truth for all your future optimization efforts.
Before you can optimize, you must define "good." In professional production, performance is not an abstract concept; it is a contract between your game and specific hardware targets. Establishing a baseline means locking your engine configuration to a consistent environment—such as a specific resolution, GPU tier, and target frame rate—to ensure your profiling data is reproducible.
Defining the Target Environment
Start by identifying your "Minimum Viable Hardware." If you are targeting a baseline of 60 FPS on a mid-range PC, you must disable dynamic settings like r.ScreenPercentage scaling and r.VSync during initial testing. By setting a static reference point, you eliminate the noise created by variable-load scenarios. Use the console command t.MaxFPS 60 to force your engine to simulate your target frame rate, allowing you to observe how your CPU and GPU budgets behave under that specific constraint.
Quantifying the Baseline
Once your environment is set, use the Stat Unit command. This displays the frame time for the Game thread (CPU logic), Draw thread (RHI commands), and GPU (rendering). Your baseline is the average time these threads take while the game is in a "steady state"—for instance, standing in your most complex environment without user input.
// Use this to check your current frame budget
Stat Unit
Record these values in a spreadsheet. This becomes your "Baseline Reference." When you later introduce heavy replication logic or complex actor spawning systems, you can re-run these metrics. If your Game thread time increases by 2ms, you know exactly how much "cost" your new systems added compared to the original baseline. Without this record, you are merely guessing whether an optimization was successful or if the performance was always that way.
Always test on a "Gold Build" that excludes debug-only overhead, as Development builds include verification logic that skews baseline data.
Key Takeaway: A performance baseline is a documented set of hardware-specific frame times that provides a constant reference point, allowing you to measure the cost of every subsequent optimization with scientific precision.