diff --git a/devtools/docs/contributor/tests/performance-tests-damp.md b/devtools/docs/contributor/tests/performance-tests-damp.md index 09c0ea071bd5..22f0bd328f5e 100644 --- a/devtools/docs/contributor/tests/performance-tests-damp.md +++ b/devtools/docs/contributor/tests/performance-tests-damp.md @@ -46,6 +46,8 @@ to focus on just one subtest run: ./mach talos-test --suite damp --subtests custom.webconsole --cycles 1 --tppagecycles 1 --gecko-profile --gecko-profile-entries 100000000 ``` +It's also possible to specify more configuration such as the profiled threads, the sampling interval or the profiler features being enabled. The parameters used in a profiling run can be copied directly from the about:profiling page in any Nightly build: click the button at the top of the page, then pick the option "Copy parameters for performance tests". + ## How to run it on try? ```bash diff --git a/devtools/docs/contributor/tests/writing-perf-tests.md b/devtools/docs/contributor/tests/writing-perf-tests.md index 5d3a9842da4b..a545597c5989 100644 --- a/devtools/docs/contributor/tests/writing-perf-tests.md +++ b/devtools/docs/contributor/tests/writing-perf-tests.md @@ -130,9 +130,11 @@ Also, you can record a profile while running the test. To do that, execute: ``` ./mach talos-test --suite damp --subtest ${your-test-name} --cycles 1 --tppagecycles 1 --gecko-profile --gecko-profile-entries 100000000 ``` -`--gecko-profile` enables the profiler +`--gecko-profile` enables the profiler
`--gecko-profile-entries` defines the profiler buffer size, which needs to be large while recording performance tests +It's also possible to specify more configuration such as the profiled threads, the sampling interval or the profiler features being enabled. The parameters used in a profiling run can be copied directly from the about:profiling page in any Nightly build: click the button at the top of the page, then pick the option "Copy parameters for performance tests". + Once it is done executing, the profile lives in a zip file you have to uncompress like this: ``` unzip testing/mozharness/build/blobber_upload_dir/profile_damp.zip diff --git a/testing/mozharness/mozharness/mozilla/testing/raptor.py b/testing/mozharness/mozharness/mozilla/testing/raptor.py index cc2e9355b798..2f057e882aa0 100644 --- a/testing/mozharness/mozharness/mozilla/testing/raptor.py +++ b/testing/mozharness/mozharness/mozilla/testing/raptor.py @@ -284,7 +284,10 @@ class Raptor( "dest": "gecko_profile", "action": "store_true", "default": False, - "help": "Whether to profile the test run and save the profile results.", + "help": ( + "Whether to profile the test run and save the profile results. " + "Copy paste the parameters used in this profiling run directly from about:profiling in Nightly." + ), }, ], [ diff --git a/testing/mozharness/mozharness/mozilla/testing/talos.py b/testing/mozharness/mozharness/mozilla/testing/talos.py index 7e1ce4a33992..c2585a2cc186 100755 --- a/testing/mozharness/mozharness/mozilla/testing/talos.py +++ b/testing/mozharness/mozharness/mozilla/testing/talos.py @@ -179,7 +179,10 @@ class Talos( "dest": "gecko_profile", "action": "store_true", "default": False, - "help": "Whether or not to profile the test run and save the profile results", + "help": ( + "Whether to profile the test run and save the profile results. " + "Copy paste the parameters used in this profiling run directly from about:profiling in Nightly." + ), }, ], [ diff --git a/testing/perfdocs/generated/browsertime.rst b/testing/perfdocs/generated/browsertime.rst index 09587cf47974..f052c446ad03 100644 --- a/testing/perfdocs/generated/browsertime.rst +++ b/testing/perfdocs/generated/browsertime.rst @@ -276,6 +276,8 @@ To run gecko profiling using Raptor-Browsertime you can add the ``--gecko-profil ./mach raptor -t amazon --gecko-profile +It's also possible to specify more configuration such as the profiled threads, the sampling interval or the profiler features being enabled. The parameters used in a profiling run can be copied directly from the about:profiling page in any Nightly build: click the button at the top of the page, then pick the option "Copy parameters for performance tests". + Note that vanilla Browsertime does support Gecko Profiling but **it does not symbolicate the profiles** so it is **not recommended** to use for debugging performance regressions/improvements. Gathering a Chrome trace with Raptor-Browsertime diff --git a/testing/perfdocs/generated/mach-try-perf.rst b/testing/perfdocs/generated/mach-try-perf.rst index c453f038d3f3..2475d252eb5a 100644 --- a/testing/perfdocs/generated/mach-try-perf.rst +++ b/testing/perfdocs/generated/mach-try-perf.rst @@ -92,7 +92,8 @@ The tool is built to be conservative about the number of tests to run, so if you --env ENV Set an environment variable, of the form FOO=BAR. Can be passed in multiple times. --gecko-profile Create and upload a gecko profile during talos/raptor - tasks. + tasks. Copy paste the parameters used in this profiling + run directly from about:profiling in Nightly. --gecko-profile-interval GECKO_PROFILE_INTERVAL How frequently to take samples (ms) --gecko-profile-entries GECKO_PROFILE_ENTRIES diff --git a/testing/perfdocs/generated/perftest-in-a-nutshell.rst b/testing/perfdocs/generated/perftest-in-a-nutshell.rst index 68201bb8d057..68a8de0c9373 100644 --- a/testing/perfdocs/generated/perftest-in-a-nutshell.rst +++ b/testing/perfdocs/generated/perftest-in-a-nutshell.rst @@ -183,7 +183,7 @@ You can also find the profiles in the artifacts tab of the Raptor test: :scale: 50% :align: center -To generate the profiles locally, you can pass the flags ``--extra-profiler-run`` or ``--gecko-profile`` which repeat the test for an extra iteration with the profiler enabled, or run the test from the beginning with the profiler enabled for three iterations, respectively. +To generate the profiles locally, you can pass the flags ``--extra-profiler-run`` or ``--gecko-profile`` which repeat the test for an extra iteration with the profiler enabled, or run the test from the beginning with the profiler enabled for three iterations, respectively. It's also possible to specify more configuration such as the profiled threads, the sampling interval or the profiler features being enabled. The parameters used in a profiling run can be copied directly from the about:profiling page in any Nightly build: click the button at the top of the page, then pick the option "Copy parameters for performance tests". Side-by-Side ------------ diff --git a/testing/performance/mach-try-perf/perfdocs/index.rst b/testing/performance/mach-try-perf/perfdocs/index.rst index c453f038d3f3..2475d252eb5a 100644 --- a/testing/performance/mach-try-perf/perfdocs/index.rst +++ b/testing/performance/mach-try-perf/perfdocs/index.rst @@ -92,7 +92,8 @@ The tool is built to be conservative about the number of tests to run, so if you --env ENV Set an environment variable, of the form FOO=BAR. Can be passed in multiple times. --gecko-profile Create and upload a gecko profile during talos/raptor - tasks. + tasks. Copy paste the parameters used in this profiling + run directly from about:profiling in Nightly. --gecko-profile-interval GECKO_PROFILE_INTERVAL How frequently to take samples (ms) --gecko-profile-entries GECKO_PROFILE_ENTRIES diff --git a/testing/performance/perftest-in-a-nutshell/perfdocs/index.rst b/testing/performance/perftest-in-a-nutshell/perfdocs/index.rst index 68201bb8d057..68a8de0c9373 100644 --- a/testing/performance/perftest-in-a-nutshell/perfdocs/index.rst +++ b/testing/performance/perftest-in-a-nutshell/perfdocs/index.rst @@ -183,7 +183,7 @@ You can also find the profiles in the artifacts tab of the Raptor test: :scale: 50% :align: center -To generate the profiles locally, you can pass the flags ``--extra-profiler-run`` or ``--gecko-profile`` which repeat the test for an extra iteration with the profiler enabled, or run the test from the beginning with the profiler enabled for three iterations, respectively. +To generate the profiles locally, you can pass the flags ``--extra-profiler-run`` or ``--gecko-profile`` which repeat the test for an extra iteration with the profiler enabled, or run the test from the beginning with the profiler enabled for three iterations, respectively. It's also possible to specify more configuration such as the profiled threads, the sampling interval or the profiler features being enabled. The parameters used in a profiling run can be copied directly from the about:profiling page in any Nightly build: click the button at the top of the page, then pick the option "Copy parameters for performance tests". Side-by-Side ------------ diff --git a/testing/raptor/raptor/cmdline.py b/testing/raptor/raptor/cmdline.py index 7e99dec92b5f..c9ebde990c3d 100644 --- a/testing/raptor/raptor/cmdline.py +++ b/testing/raptor/raptor/cmdline.py @@ -186,10 +186,11 @@ def create_parser(mach_interface=False): "--gecko-profile", action="store_true", dest="gecko_profile", - help="Profile the run and out-put the results in $MOZ_UPLOAD_DIR. " + help="Profile the run and output the results in $MOZ_UPLOAD_DIR. " "After talos is finished, profiler.firefox.com will be launched in Firefox " "so you can analyze the local profiles. To disable auto-launching of " - "profiler.firefox.com, set the DISABLE_PROFILE_LAUNCH=1 env var.", + "profiler.firefox.com, set the DISABLE_PROFILE_LAUNCH=1 env var. " + "Copy paste the parameters used in this profiling run directly from about:profiling in Nightly.", ) add_arg( "--gecko-profile-entries", diff --git a/testing/raptor/raptor/perfdocs/browsertime.rst b/testing/raptor/raptor/perfdocs/browsertime.rst index 09587cf47974..f052c446ad03 100644 --- a/testing/raptor/raptor/perfdocs/browsertime.rst +++ b/testing/raptor/raptor/perfdocs/browsertime.rst @@ -276,6 +276,8 @@ To run gecko profiling using Raptor-Browsertime you can add the ``--gecko-profil ./mach raptor -t amazon --gecko-profile +It's also possible to specify more configuration such as the profiled threads, the sampling interval or the profiler features being enabled. The parameters used in a profiling run can be copied directly from the about:profiling page in any Nightly build: click the button at the top of the page, then pick the option "Copy parameters for performance tests". + Note that vanilla Browsertime does support Gecko Profiling but **it does not symbolicate the profiles** so it is **not recommended** to use for debugging performance regressions/improvements. Gathering a Chrome trace with Raptor-Browsertime diff --git a/testing/talos/talos/cmdline.py b/testing/talos/talos/cmdline.py index 697342e96961..49c558162dd7 100644 --- a/testing/talos/talos/cmdline.py +++ b/testing/talos/talos/cmdline.py @@ -144,7 +144,8 @@ def create_parser(mach_interface=False): "After talos is finished, profiler.firefox.com will be launched in " "Firefox so you can analyze the local profiles. To disable " "auto-launching of profiler.firefox.com set the " - "DISABLE_PROFILE_LAUNCH=1 env var.", + "DISABLE_PROFILE_LAUNCH=1 env var. " + "Copy paste the parameters used in this profiling run directly from about:profiling in Nightly.", ) add_arg( "--gecko-profile-interval", diff --git a/tools/tryselect/task_config.py b/tools/tryselect/task_config.py index 9eee8734656c..231339b66af9 100644 --- a/tools/tryselect/task_config.py +++ b/tools/tryselect/task_config.py @@ -438,7 +438,10 @@ class GeckoProfile(TryConfig): "dest": "profile", "action": "store_true", "default": False, - "help": "Create and upload a gecko profile during talos/raptor tasks.", + "help": ( + "Create and upload a gecko profile during talos/raptor tasks. " + "Copy paste the parameters used in this profiling run directly from about:profiling in Nightly." + ), }, ], [