Skip to content

How to Use the Unity Performance Benchmark Reporter

Sean Stolberg edited this page Aug 15, 2018 · 8 revisions

The Unity Performance Benchmark Reporter is built as a .NET Core 2.X assembly so that it is compatible to run across different .NET supported platforms (Windows, OSX, etc). Therefore in order to run it, you need to invoke the assembly with the dotnet command like this:

dotnet UnityPerformanceBenchmarkReporter.dll --baselinexmlsource=D:\UnityPerf\baselines --testresultsxmlsource=D:\UnityPerf\results --reportdirpath=d:\UnityPerf

In the example above, we're passing the assembly

  • --testresultsxmlsource the path to a directory where we have one or more non-baseline result .xml files to be included in the html report.

    At least one --testresultsxmlsource value must be passed to the UnityPerformanceBenchmarkReporter.dll assembly. This is the only requied field.

    This command line option also can be used to specify the path to a single .xml non-baseline result file. Additionally, you can specify several directories or files by repeating the option like this:

    --testresultsxmlsource=D:\UnityPerf\results --testresultsxmlsource=D:\UnityPerf\results.xml

  • --baselinexmlsource the path to a directory where we have one or more baseline result .xml files to be used to compare other results against. This command line option also can be used to specify the path to a single .xml baseline result file. Additionally, you can specify several directories or files by repeating the option like this:

    --baselinexmlsource=D:\UnityPerf\baselines --baselinexmlsource=D:\UnityPerf\baseline.xml

  • --reportdirpath the path to a directory where the reporter will create the performance benchmark report. This is created in a UnityPerformanceBenchmark subdirectory.

    If the report location is not specified, the UnityPerformanceBenchmark subdirectory will be created in the working directory that the UnityPerformanceBenchmarkReporter.dll was invoked.

Here is the full output of running

dotnet UnityPerformanceBenchmarkReporter.dll --help

Usage is:
-?, --help, -h Prints out the options.

     --testresultsxmlsource=VALUE
            REQUIRED - Path to a test result XML filename or
            directory. Directories are searched resursively.
            You can repeat this option with multiple result
            file or directory paths.

    --baselinexmlsource[=VALUE]
            OPTIONAL - Path to a baseline XML filename or
            directory. Directories are searched resursively.
            You can repeat this option with multiple
            baseline file or directory paths.

    --reportdirpath[=VALUE]
            OPTIONAL - Path to directory where the
            UnityPerformanceBenchmark report will be written.
            Default is current working directory.

    --sigfig[=VALUE] OPTIONAL - Specify the number of significant
            figures to use when collecting and calculating
            thresholds and failures for non-integer based
            metrics (from the profiler, Camer.Render CPU
            time in milliseconds, for example). This value
            must be an integer >= 0.

Clone this wiki locally