Test harness for benchmarking web games.
Перейти к файлу
rachelmsimm b2579dc513
Send exit/print functions to browser when autoRun is enabled (#14)
* send exit/print functions to browser when autoRun is enabled

* create autoRunEnabled constant
2023-11-21 11:02:37 +02:00
2015-08-27-10kCubes Initial commit 2017-07-21 13:08:13 +03:00
2017-07-20-Mandelbrot Initial commit 2017-07-21 13:08:13 +03:00
WebGLTemplates/emunittest-template Add WebGL template that can be added to any WebGL project. 2022-06-15 19:51:47 +02:00
core-estimator Initial commit 2017-07-21 13:08:13 +03:00
demos New karting benchmarks 2021-03-05 15:13:03 +01:00
filelock Initial commit 2017-07-21 13:08:13 +03:00
sha256 Initial commit 2017-07-21 13:08:13 +03:00
.gitattributes Initial commit 2017-07-21 13:08:13 +03:00
.gitignore New karting benchmarks 2021-03-05 15:13:03 +01:00
AUTOMATION.txt Initial commit 2017-07-21 13:08:13 +03:00
LICENSE Added LICENSE file (3-clause BSD license) 2023-06-13 14:48:26 +03:00
README.md Deprecate Python 2 (#6) 2023-05-25 10:43:57 -07:00
benchmark_firefox.py Initial commit 2017-07-21 13:08:13 +03:00
cpuprofiler.js Last resort capture webgl context 2020-03-23 09:41:06 +02:00
demo_requirements.txt Initial commit 2017-07-21 13:08:13 +03:00
emrun.py Add no-store to cache control headers 2023-08-21 09:31:58 -07:00
emtimer.js Add Skelebuddies-Wasm-Release-2020-10-26-profiling and Wasm2JS. 2020-10-27 10:22:58 +02:00
error_icon.png Initial commit 2017-07-21 13:08:13 +03:00
featuretest.js Initial commit 2017-07-21 13:08:13 +03:00
index.html Replace HTML `onclick` attributes with calls to `Element#addEventListener` 2023-05-30 11:23:22 -07:00
index.js Send exit/print functions to browser when autoRun is enabled (#14) 2023-11-21 11:02:37 +02:00
info_icon.png Initial commit 2017-07-21 13:08:13 +03:00
install.py Deprecate Python 2 (#6) 2023-05-25 10:43:57 -07:00
resize.js Initial commit 2017-07-21 13:08:13 +03:00
resultsServer.js Initial commit 2017-07-21 13:08:13 +03:00
run Make run script executable 2020-01-28 13:29:03 +02:00
run.py Update emrun and update to use python 3. 2021-03-03 13:34:09 +02:00
start_server Remove code duplication in `start_server` 2023-05-30 11:28:56 -07:00
start_server.bat Update emrun to work with Python 3. 2019-09-28 12:02:35 +02:00
tiny-unity-instructions.txt Update instructions and simplify integration a little bit 2020-05-04 11:40:02 +03:00
unity-instructions.txt Update unity-instructions.txt to new CSS 2023-05-30 14:46:25 +03:00

README.md

Emunittest Unity Browser WebAssembly Benchmark Suite

This repository contains a test suite for benchmarking WebAssembly based Unity content in web browsers.

It consists of a number of classic Unity and Dots/Tiny Unity compiled demos, that have been converted to run deterministically in the browser. This enables comparing browser performance, and testing against bugs.

The result data that emunittest provides looks something like this

 Run Date         | Test Name                             | Total time (lower is better) |   FPS | CPU Time |   WebGL CPU Time | WebGL calls/frame| CPU Idle | Page load time | # of janked frames | Used JS Mem
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 2020-10-27 10:55 | Skelebuddies wasm-2020-10-26          |                      13348ms |154.00 |  11622ms |    (not tracked) |    (not tracked) |    8.71% |       237.25ms |                  6 |     166.0MB
 2020-10-27 10:56 | Skelebuddies wasm2js-2020-10-26       |                      46688ms | 43.87 |  44544ms |    (not tracked) |    (not tracked) |    1.83% |       904.22ms |                 86 |     214.4MB
 2020-10-27 10:56 | Tiny3D Unity Classic-2020-04-20       |                       7162ms |241.14 |   4487ms |    (not tracked) |    (not tracked) |   16.15% |      1626.30ms |                  5 |     114.4MB
 2020-10-27 10:56 | Tiny3D-2020-03-01                     |                       4859ms |207.34 |   1921ms |    (not tracked) |    (not tracked) |   53.81% |       309.47ms |                 17 |     190.6MB
 2020-10-27 10:56 | Lost Crypt-2019-12-20                 |                      29535ms | 75.74 |  24952ms |    (not tracked) |    (not tracked) |    4.03% |      2976.06ms |                 20 |     649.9MB
 2020-10-27 10:57 | TinyRacing v3 wasm-2020-03-18         |                      10376ms |130.01 |   8210ms |    (not tracked) |    (not tracked) |   13.36% |       220.37ms |                  8 |     145.7MB
 2020-10-27 10:57 | TinyRacing v3 wasm2js-2020-03-17      |                      16528ms | 81.74 |  14795ms |    (not tracked) |    (not tracked) |    4.35% |       460.43ms |                 48 |     174.7MB
 2020-10-27 10:57 | TinyRacing v3 fc wasm-2020-03-17      |                       9145ms |148.95 |   6657ms |    (not tracked) |    (not tracked) |   18.57% |       257.60ms |                  4 |     147.5MB
 2020-10-27 10:57 | TinyRacing v3 fc asmjs-2020-03-17     |                      11687ms |123.55 |   9013ms |    (not tracked) |    (not tracked) |   11.11% |      1007.01ms |                  6 |     168.5MB
 2020-10-27 10:58 | TinyRacing v2 RC-2020-01-24           |                      17712ms | 75.16 |  16193ms |    (not tracked) |    (not tracked) |    3.65% |       256.10ms |                  4 |     159.9MB
 2020-10-27 10:58 | TinyRacing v1-2019-12-12              |                      11353ms |118.14 |   9858ms |    (not tracked) |    (not tracked) |    7.14% |       212.35ms |                  5 |     164.9MB
 2020-10-27 10:58 | Tanks-2019-10-04                      |                       8477ms |198.45 |   6338ms |    (not tracked) |    (not tracked) |   10.25% |       743.25ms |                  4 |     168.8MB
 2020-10-27 10:58 | Microgame - FPS-2019-09-22            |                      10975ms |107.29 |   7679ms |    (not tracked) |    (not tracked) |   13.42% |      1468.69ms |                 14 |     345.2MB
 2020-10-27 10:58 | Ruby's Adventure-2019-07-22           |                       8320ms |243.49 |   4210ms |    (not tracked) |    (not tracked) |   24.59% |      1866.00ms |                  6 |     137.9MB
 2020-10-27 10:59 | The Explorer-2019-07-23               |                      17610ms | 98.13 |  11624ms |    (not tracked) |    (not tracked) |    7.39% |      4098.70ms |                 12 |     718.1MB
 2020-10-27 10:59 | LWRPTemplate-2019-09-19               |                       6836ms |104.52 |   3566ms |    (not tracked) |    (not tracked) |   11.86% |      1818.85ms |                  6 |     260.5MB
 2020-10-27 10:59 | Microgame - Kart-2019-07-25           |                      18888ms |119.61 |  11037ms |    (not tracked) |    (not tracked) |   31.48% |      1950.83ms |                 13 |     330.3MB
 2020-10-27 11:00 | BoatAttack-2019-07-22                 |                      43921ms | 51.81 |  37067ms |    (not tracked) |    (not tracked) |    2.62% |      5093.16ms |                 22 |     667.2MB
                  |                                       |                              |       |          |                  |          |                |                    |

Installation

Prerequisite: a Python 3 interpreter on the PATH

To install the suite for local use, run

git clone https://github.com/Unity-Technologies/emunittest.git
cd emunittest
python install.py # or python3 install.py

To update an existing installation to a newer version, run

cd /path/to/emunittest
git pull
python install.py # or python3 install.py

Running

After installing, launch start_server.bat (or ./start_server on Linux and macOS) to spin up an ad hoc web server at http://localhost:6932/ to host the content.

Then navigate to http://localhost:6932/ to visit the launcher.

There are three main ways to run:

  1. Run the full suite by clicking on Run tests button in the launcher. Be sure to allow popups to help the tests to run through
  2. Run a single test by clicking on Test to the right side of the test name.
  3. Run a single demo in interactive mode by clicking on Launch button next to a test. In this mode the content runs unmodified to the original build from Unity.

Additionally there are a few options to customize how the content is run, e.g. one can disable vsync (uses postMessage() to self to render instead of rAF()), embed a CPU frametime profiler graph, or run the suite in a torture test mode.

Contact

For bugs and feedback, contact jukkajATunity3dDOTcom.