Bug 1870864 - Fix mozperftest writing docs to mention mochitest. r=aglavic,perftest-reviewers DONTBUILD

This patch fixes the mozperftest docs to mention mochitest in the writing section, as well as fixes the `info` calls so that they mention the JSON.stringify requirement.

Differential Revision: https://phabricator.services.mozilla.com/D196853
This commit is contained in:
Greg Mierzwinski 2024-01-08 15:15:45 +00:00
parent 41a9498074
commit d126866ea8
2 changed files with 6 additions and 4 deletions

View File

@ -10,6 +10,7 @@ new ones):
- **xpcshell** a classical xpcshell test, turned into a performance test
- **browsertime** a browsertime script, which runs a full browser and controls
it via a Selenium client.
- **mochitest** a classical mochitest test, turned into a performance test
In order to qualify as performance tests, both flavors require metadata.
@ -48,7 +49,7 @@ Here's an example of such a metrics call::
# compute some speed metrics
let speed = 12345;
info("perfMetrics", { speed });
info("perfMetrics", JSON.stringify({ speed }));
Mochitest
@ -86,7 +87,7 @@ Here's an example of a call that will produce metrics::
# compute some speed metrics
let speed = 12345;
info("perfMetrics", { speed });
info("perfMetrics", JSON.stringify({ speed }));
Existing Mochitest unit tests can be modified with these to be compatible with mozperftest, but note that some issues exist when doing this:

View File

@ -10,6 +10,7 @@ new ones):
- **xpcshell** a classical xpcshell test, turned into a performance test
- **browsertime** a browsertime script, which runs a full browser and controls
it via a Selenium client.
- **mochitest** a classical mochitest test, turned into a performance test
In order to qualify as performance tests, both flavors require metadata.
@ -48,7 +49,7 @@ Here's an example of such a metrics call::
# compute some speed metrics
let speed = 12345;
info("perfMetrics", { speed });
info("perfMetrics", JSON.stringify({ speed }));
Mochitest
@ -86,7 +87,7 @@ Here's an example of a call that will produce metrics::
# compute some speed metrics
let speed = 12345;
info("perfMetrics", { speed });
info("perfMetrics", JSON.stringify({ speed }));
Existing Mochitest unit tests can be modified with these to be compatible with mozperftest, but note that some issues exist when doing this: