Table of Contents
The Unity Performance Benchmark Reporter enables the comparison of performance metric baselines and subsequent performance metrics (as generated using the Unity Test Runner with the Unity Performance Testing Extension) in an html report utilizing graphical visualizations.
Unity Partners and Developers that want to establish performance metric baselines prior to changing their game, code, SDK, driver, etc, can leverage this reporter along with the Unity Test Runner framework and the Unity Performance Testing Extension. As changes are made in your code during development, you can gather these performance metrics iteratively with performance tests and compare the results against the baseline with the Unity Performance Benchmark Reporter to help detect performance regressions (or improvements!) introduced by the changes.
What You'll Need
Here are the tools you'll need to start running Unity performance tests, collecting metrics, establishing one or more performance metric baselines, and running subsequent performance tests to compare them as you make changes to your code.
1. Unity Installation - version 2018.1 and forward is supported by the Unity Performance Test Extension. This needs to be configured for build and deployment for the platform, SDKs, development environment, etc.
The XRAutomatedTests project contains a sample performance benchmark Unity project in the
PerformanceTests/UnityPerformanceBenchmark subdirectory. Download the latest released sample project from the branch/release that corresponds to the major/minor version of Unity you'll be testing against (currently 2018.1 and forward is supported).
This sample project uses the Unity Test Runner framework and the Unity Performance Testing Extension. Feel free to start with this project, or use it to inspire your own performance test for your specific context.
3. Unity Performance Benchmark Reporter
That's the GitHib repo you're on right now. Download the latest release (or clone and build the source if you desire) from the branch/release that corresponds to the major/minor version of Unity you'll be testing against (currently 2018.1 and forward is supported).
Unity Performance Benchmark Components
The image below illustrates the components used to run performance tests and collect metrics with the Unity Test Runner framework and Performance Testing Extension, then establish baseline performance metrics against subsequent metric collection.