Enable conditional profiling of Firefox #48
Description
Is your feature request related to a problem? Please describe.
Sometimes Firefox takes a long time to start up on certain hardware and container solutions. To debug such scenarios more efficiently, a performance profile of the browsers would be useful.
Describe the solution you'd like
A flag, preferably passed through the requested capabilities, which adds the following environment variables to Firefox:
.env("MOZ_PROFILER_STARTUP", "1")
.env("MOZ_PROFILER_SHUTDOWN", "/profile.json")
Additionally, the created file should be uploaded to the storage provider used for video recording. Making this as generic as possible would be of interest as it would allow arbitrary files stored within the container to be uploaded on shutdown (e.g. files downloaded during a test run).
An example profile can be found here: https://share.firefox.dev/3jGOd8u