TestEngineering/Performance/Raptor: Difference between revisions

Jump to navigation Jump to search
Removed reference to mozilla-central in shell prompt
(→‎Benchmark Tests: Adding YouTube playback performance overview)
(Removed reference to mozilla-central in shell prompt)
Line 157: Line 157:
To see which Raptor performance tests are currently available on all platforms, use the 'print-tests' option, e.g.:
To see which Raptor performance tests are currently available on all platforms, use the 'print-tests' option, e.g.:


     mozilla-central$ ./mach raptor-test --print-tests
     $ ./mach raptor-test --print-tests


That will output all available tests on each supported app, as well as each subtest available in each suite (i.e. all the pages in a specific page-load tp6* suite).
That will output all available tests on each supported app, as well as each subtest available in each suite (i.e. all the pages in a specific page-load tp6* suite).
Line 165: Line 165:
To run Raptor locally, just build Firefox and then run:
To run Raptor locally, just build Firefox and then run:


     mozilla-central$ ./mach raptor-test --test <raptor-test-name>
     $ ./mach raptor-test --test <raptor-test-name>


For example, to run the raptor-tp6 pageload test locally, just use:
For example, to run the raptor-tp6 pageload test locally, just use:


     mozilla-central$ ./mach raptor-test --test raptor-tp6-1
     $ ./mach raptor-test --test raptor-tp6-1


You can run individual subtests too (i.e. a single page in one of the tp6* suites). For example, to run the amazon page-load test on Firefox:
You can run individual subtests too (i.e. a single page in one of the tp6* suites). For example, to run the amazon page-load test on Firefox:


     mozilla-central$ ./mach raptor-test --test raptor-tp6-amazon-firefox
     $ ./mach raptor-test --test raptor-tp6-amazon-firefox


Raptor test results will be found locally in <your-repo>/testing/mozharness/build/raptor.json.
Raptor test results will be found locally in <your-repo>/testing/mozharness/build/raptor.json.
Line 183: Line 183:
First, ensure your local host machine has the Android SDK/Tools (i.e. ADB) installed. Check if it is already installed by attaching your Android device to USB and running:
First, ensure your local host machine has the Android SDK/Tools (i.e. ADB) installed. Check if it is already installed by attaching your Android device to USB and running:


     mozilla-central$ adb devices
     $ adb devices


If your device serial number is listed, then you're all set. If ADB is not found, you can install it by running (in your local mozilla-development repo):
If your device serial number is listed, then you're all set. If ADB is not found, you can install it by running (in your local mozilla-development repo):


     mozilla-central$ ./mach bootstrap
     $ ./mach bootstrap


Then, in bootstrap, select the option for "Firefox for Android Artifact Mode," which will install the required tools (no need to do an actual build).
Then, in bootstrap, select the option for "Firefox for Android Artifact Mode," which will install the required tools (no need to do an actual build).
Line 201: Line 201:
* The geckoview example app is already installed on the device (from ./mach bootstrap, above). Download the geckoview_example.apk from the appropriate [https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&searchStr=android%2Cbuild android build on treeherder], then install it on your device, i.e.:
* The geckoview example app is already installed on the device (from ./mach bootstrap, above). Download the geckoview_example.apk from the appropriate [https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&searchStr=android%2Cbuild android build on treeherder], then install it on your device, i.e.:


     mozilla-central$ adb install -g ../Downloads/geckoview_example.apk
     $ adb install -g ../Downloads/geckoview_example.apk


The '-g' flag will automatically set all application permissions ON, which is required.
The '-g' flag will automatically set all application permissions ON, which is required.
Line 209: Line 209:
When updating the geckoview example app, you MUST uninstall the existing one first, i.e.:
When updating the geckoview example app, you MUST uninstall the existing one first, i.e.:


     mozilla-central$ adb uninstall org.mozilla.geckoview_example
     $ adb uninstall org.mozilla.geckoview_example


Once your Android device is ready, and attached to local USB, from within your local mozilla repo use the following command line to run speedometer:
Once your Android device is ready, and attached to local USB, from within your local mozilla repo use the following command line to run speedometer:


     mozilla-central$ ./mach raptor-test --test raptor-speedometer --app=geckoview --binary="org.mozilla.geckoview_example"
     $ ./mach raptor-test --test raptor-speedometer --app=geckoview --binary="org.mozilla.geckoview_example"


Note: Speedometer on Android GeckoView is currently running on two devices in production - the Google Pixel 2 and the Moto G5 - therefore it is not guaranteed that it will run successfully on all/other untested android devices. There is an intermittent failure on the Moto G5 where speedometer just stalls ([https://bugzilla.mozilla.org/show_bug.cgi?id=1492222 Bug 1492222]).
Note: Speedometer on Android GeckoView is currently running on two devices in production - the Google Pixel 2 and the Moto G5 - therefore it is not guaranteed that it will run successfully on all/other untested android devices. There is an intermittent failure on the Moto G5 where speedometer just stalls ([https://bugzilla.mozilla.org/show_bug.cgi?id=1492222 Bug 1492222]).
Line 219: Line 219:
To run a Raptor page-load test (i.e. tp6m-1) on the GeckoView Example app, use this command line:
To run a Raptor page-load test (i.e. tp6m-1) on the GeckoView Example app, use this command line:


     mozilla-central$ ./mach raptor-test --test raptor-tp6m-1 --app=geckoview --binary="org.mozilla.geckoview_example"
     $ ./mach raptor-test --test raptor-tp6m-1 --app=geckoview --binary="org.mozilla.geckoview_example"


A couple notes about debugging:
A couple notes about debugging:
Line 225: Line 225:
* Raptor browser-extension console messages *do* appear in adb logcat via the GeckoConsole - so this is handy:
* Raptor browser-extension console messages *do* appear in adb logcat via the GeckoConsole - so this is handy:


     mozilla-central$ adb logcat | grep GeckoConsole
     $ adb logcat | grep GeckoConsole


* You can also debug Raptor on Android using the Firefox WebIDE; click on the Android device listed under "USB Devices" and then "Main Process" or the 'localhost: Speedometer.." tab process
* You can also debug Raptor on Android using the Firefox WebIDE; click on the Android device listed under "USB Devices" and then "Main Process" or the 'localhost: Speedometer.." tab process
Line 235: Line 235:
To run Raptor locally on Google Chrome, make sure you already have a local version of Google Chrome installed, and then from within your mozilla-repo run:
To run Raptor locally on Google Chrome, make sure you already have a local version of Google Chrome installed, and then from within your mozilla-repo run:


     mozilla-central$ ./mach raptor-test --test <raptor-test-name> --app=chrome --binary="<path to google chrome binary>"
     $ ./mach raptor-test --test <raptor-test-name> --app=chrome --binary="<path to google chrome binary>"


For example, to run the raptor-speedometer benchmark on Google Chrome use:
For example, to run the raptor-speedometer benchmark on Google Chrome use:


     mozilla-central$ ./mach raptor-test --test raptor-speedometer --app=chrome --binary="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome
     $ ./mach raptor-test --test raptor-speedometer --app=chrome --binary="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome


Raptor test results will be found locally in <your-repo>/testing/mozharness/build/raptor.json.
Raptor test results will be found locally in <your-repo>/testing/mozharness/build/raptor.json.
Line 286: Line 286:
The easiest way to run Raptor tests on try is to use mach try fuzzy:
The easiest way to run Raptor tests on try is to use mach try fuzzy:


     mozilla-central$ ./mach try fuzzy --full
     $ ./mach try fuzzy --full


Then type 'raptor' and select which Raptor tests (and on what platforms) you wish to run.
Then type 'raptor' and select which Raptor tests (and on what platforms) you wish to run.
Line 311: Line 311:
To tell Raptor to create Gecko profiles during a performance test, just add the '--gecko-profile' flag to the command line, i.e.:
To tell Raptor to create Gecko profiles during a performance test, just add the '--gecko-profile' flag to the command line, i.e.:


     mozilla-central$ ./mach raptor-test --test raptor-sunspider --gecko-profile
     $ ./mach raptor-test --test raptor-sunspider --gecko-profile


When the Raptor test is finished, you will be able to find the resulting gecko profiles (ZIP) located locally in:
When the Raptor test is finished, you will be able to find the resulting gecko profiles (ZIP) located locally in:
Line 329: Line 329:
To turn on Gecko profiling for Raptor test jobs on try pushes, just add the '--gecko-profile' flag to your try push i.e.:
To turn on Gecko profiling for Raptor test jobs on try pushes, just add the '--gecko-profile' flag to your try push i.e.:


     mozilla-central$ ./mach try fuzzy --gecko-profile
     $ ./mach try fuzzy --gecko-profile


Then select the Raptor test jobs that you wish to run. The Raptor jobs will be run on try with profiling included. While profiling is turned on, Raptor will automatically reduce the number of pagecycles to 2.
Then select the Raptor test jobs that you wish to run. The Raptor jobs will be run on try with profiling included. While profiling is turned on, Raptor will automatically reduce the number of pagecycles to 2.
canmove, Confirmed users, Bureaucrats and Sysops emeriti
4,747

edits

Navigation menu