-
Notifications
You must be signed in to change notification settings - Fork 217
Profiling
For profiling performance questions that are related to WebGL and WebVR in Firefox Reality, webgfx-tests is a good choice. This tool helps us compare the performance difference between the changes you made and before your changes. To run this profiler, there are a few steps as below.
- Pull webgfx-tests, install it by
npm install -g webgfx-tests
. - Getting your device id by
webgfx-tests list-devices
, and you will see the serial number of your device. - Getting your available browsers by
webgfx-tests list-browsers --adb
. You should be able to see fxr in your console.
Browsers on device: xxx (serial: XXXXXXXXX)
-----------------------------------------------------
fxr
-----------------------------------------------------
- Then, we need to select a test to run. Check
webgfx-tests/examples/tests/tests.json
, find a test you want to run, and do some changes on its configuration to allow it run in the immersive mode automatically.
"interactive": false,
"autoenterXR": true,
"skipReferenceImageTest": true
For a quick start, webvr_info_3 is a good one for taking a try.
- Running a profiling,
webgfx-tests run {%TEST_ID%} -a {%YOUR_DEVICE_SN%} -b fxr -c {%YOUR_CONFIG_FILE_PATH%} -o {%OUTPUT_FILE%} -n {%TIMES%}
TEST_ID: One of test ids from webgfx-tests/examples/tests/tests.json, e.g. webvr_info_3.
YOUR_DEVICE_SN: This is your serial number you get from webgfx-tests list-devices
.
YOUR_BROWSER: Assign this test to be run in which browser. e.g. fxr.
YOUR_CONFIG_FILE_PATH: Assign a config file, e.g. ./examples/tests/webgfx-tests.config.json
.
OUTPUT_FILE: Output the profiling result into a text file. ex: result.json.
TIMES: Run the same test for a few times. e.g. 5.
Then, you might have your own developer build version of Firefox Reality, run the same command as above, the make it dump the result to another file, like result1.json.
- Finally, to do comparison between these two versions of builds by group by these two result files via
webgfx-tests summary {%OUTPUT_FILE_1%} {%OUTPUT_FILE_2%} --groupby file
.