зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1865869 - Allow toml files to be used in perfdocs generation. r=jmarshall,perftest-reviewers,afinder DONTBUILD
This patch fixes an issue where only `perftest.ini` manifests were being parsed for mozperftest tests in perfdocs. It's temporary as we will move all ini manifests to toml in the future. At the same time, this patch adds missing documentation for some new mozperftest tests that use a toml manifest to define the tests. Differential Revision: https://phabricator.services.mozilla.com/D194251
This commit is contained in:
Родитель
5720dcde1d
Коммит
1c04160996
|
@ -40,3 +40,10 @@ suites:
|
|||
description: "Performance tests from the 'browser/base/content/test' folder."
|
||||
tests:
|
||||
Dom-size: ""
|
||||
|
||||
dom/serviceworkers/test/performance:
|
||||
description: "Performance tests running through Mochitest for Service Workers"
|
||||
tests:
|
||||
"Service Worker Caching": ""
|
||||
"Service Worker Fetch": ""
|
||||
"Service Worker Registration": ""
|
||||
|
|
|
@ -551,6 +551,7 @@ perfdocs-verify:
|
|||
- 'devtools/perfdocs/**'
|
||||
- 'taskcluster/**'
|
||||
- '**/perftest.ini'
|
||||
- '**/perftest.toml'
|
||||
- 'python/mozperftest/**'
|
||||
- 'testing/awsy/**'
|
||||
- 'testing/raptor/**'
|
||||
|
|
|
@ -29,6 +29,62 @@ perftest_browser_xhtml_dom.js
|
|||
**Measures the size of the DOM**
|
||||
|
||||
|
||||
dom/serviceworkers/test/performance
|
||||
-----------------------------------
|
||||
Performance tests running through Mochitest for Service Workers
|
||||
|
||||
test_caching.html
|
||||
=================
|
||||
|
||||
:owner: DOM LWS
|
||||
:name: Service Worker Caching
|
||||
:Default options:
|
||||
|
||||
::
|
||||
|
||||
--perfherder
|
||||
--perfherder-metrics name:No cache,unit:ms,shouldAlert:True, name:Cached,unit:ms,shouldAlert:True, name:No cache again,unit:ms,shouldAlert:True
|
||||
--verbose
|
||||
--manifest perftest.toml
|
||||
--manifest-flavor plain
|
||||
|
||||
**Test service worker caching.**
|
||||
|
||||
test_fetch.html
|
||||
===============
|
||||
|
||||
:owner: DOM LWS
|
||||
:name: Service Worker Fetch
|
||||
:Default options:
|
||||
|
||||
::
|
||||
|
||||
--perfherder
|
||||
--perfherder-metrics name:Cold fetch,unit:ms,shouldAlert:True, name:Undisturbed fetch,unit:ms,shouldAlert:True, name:Intercepted fetch,unit:ms,shouldAlert:True, name:Liberated fetch,unit:ms,shouldAlert:True, name:Undisturbed XHR,unit:ms,shouldAlert:True, name:Intercepted XHR,unit:ms,shouldAlert:True, name:Liberated XHR,unit:ms,shouldAlert:True
|
||||
--verbose
|
||||
--manifest perftest.toml
|
||||
--manifest-flavor plain
|
||||
|
||||
**Test cold and warm fetches.**
|
||||
|
||||
test_registration.html
|
||||
======================
|
||||
|
||||
:owner: DOM LWS
|
||||
:name: Service Worker Registration
|
||||
:Default options:
|
||||
|
||||
::
|
||||
|
||||
--perfherder
|
||||
--perfherder-metrics name:Registration,unit:ms,shouldAlert:True, name:Activation,unit:ms,shouldAlert:True, name:Unregistration,unit:ms,shouldAlert:True
|
||||
--verbose
|
||||
--manifest perftest.toml
|
||||
--manifest-flavor plain
|
||||
|
||||
**Test registration, activation, and unregistration.**
|
||||
|
||||
|
||||
netwerk/test/perf
|
||||
-----------------
|
||||
Performance tests from the 'network/test/perf' folder.
|
||||
|
|
|
@ -317,6 +317,18 @@ class MozperftestGatherer(FrameworkGatherer):
|
|||
Gatherer for the Mozperftest framework.
|
||||
"""
|
||||
|
||||
def get_manifests(self):
|
||||
"""
|
||||
Returns a list of manifests defined for mozperftest. This handles
|
||||
the temporary situation of having both `ini`, and `toml` manifests
|
||||
defined in-tree.
|
||||
|
||||
:return list: A list containing all the valid mozperftest manifests.
|
||||
"""
|
||||
paths = list(pathlib.Path(self.workspace_dir).rglob("perftest.ini"))
|
||||
paths += list(pathlib.Path(self.workspace_dir).rglob("perftest.toml"))
|
||||
return paths
|
||||
|
||||
def get_test_list(self):
|
||||
"""
|
||||
Returns a dictionary containing the tests that are in perftest.ini manifest.
|
||||
|
@ -328,7 +340,7 @@ class MozperftestGatherer(FrameworkGatherer):
|
|||
},
|
||||
}
|
||||
"""
|
||||
for path in pathlib.Path(self.workspace_dir).rglob("perftest.ini"):
|
||||
for path in self.get_manifests():
|
||||
if "obj-" in str(path):
|
||||
continue
|
||||
suite_name = str(path.parent).replace(str(self.workspace_dir), "")
|
||||
|
|
Загрузка…
Ссылка в новой задаче