Bug 1869871 - convert perftest.ini -> .toml. r=sparky,perftest-reviewers,necko-reviewers,jesup

Differential Revision: https://phabricator.services.mozilla.com/D196334
This commit is contained in:
Joel Maher 2023-12-14 19:41:14 +00:00
parent 9a3107e8f7
commit 2a46c30602
21 changed files with 72 additions and 55 deletions

View File

@ -1 +0,0 @@
[perftest_browser_xhtml_dom.js]

View File

@ -0,0 +1,3 @@
[DEFAULT]
["perftest_browser_xhtml_dom.js"]

View File

@ -71,7 +71,7 @@ DIRS += [
"content/test/performance/",
]
PERFTESTS_MANIFESTS += ["content/test/perftest.ini"]
PERFTESTS_MANIFESTS += ["content/test/perftest.toml"]
DEFINES["MOZ_APP_VERSION"] = CONFIG["MOZ_APP_VERSION"]
DEFINES["MOZ_APP_VERSION_DISPLAY"] = CONFIG["MOZ_APP_VERSION_DISPLAY"]

View File

@ -1,4 +0,0 @@
[perftest_dateTimeFormat.js]
[perftest_locale.js]
[perftest_numberFormat.js]
[perftest_pluralRules.js]

View File

@ -0,0 +1,9 @@
[DEFAULT]
["perftest_dateTimeFormat.js"]
["perftest_locale.js"]
["perftest_numberFormat.js"]
["perftest_pluralRules.js"]

View File

@ -36,7 +36,7 @@ EXPORTS += [
]
PERFTESTS_MANIFESTS += ["benchmarks/perftest.ini"]
PERFTESTS_MANIFESTS += ["benchmarks/perftest.toml"]
XPCSHELL_TESTS_MANIFESTS += ["benchmarks/xpcshell.toml"]
with Files("**"):

View File

@ -25,7 +25,7 @@ TESTING_JS_MODULES += [
"unit/test_http3_prio_helpers.js",
]
PERFTESTS_MANIFESTS += ["perf/perftest.ini", "unit/perftest.ini"]
PERFTESTS_MANIFESTS += ["perf/perftest.toml", "unit/perftest.toml"]
MARIONETTE_UNIT_MANIFESTS += [
"marionette/manifest.ini",

View File

@ -1,8 +0,0 @@
[perftest_http3_cloudflareblog.js]
[perftest_http3_controlled.js]
[perftest_http3_facebook_scroll.js]
[perftest_http3_google_image.js]
[perftest_http3_google_search.js]
[perftest_http3_lucasquicfetch.js]
[perftest_http3_youtube_watch.js]
[perftest_http3_youtube_watch_scroll.js]

View File

@ -0,0 +1,17 @@
[DEFAULT]
["perftest_http3_cloudflareblog.js"]
["perftest_http3_controlled.js"]
["perftest_http3_facebook_scroll.js"]
["perftest_http3_google_image.js"]
["perftest_http3_google_search.js"]
["perftest_http3_lucasquicfetch.js"]
["perftest_http3_youtube_watch.js"]
["perftest_http3_youtube_watch_scroll.js"]

View File

@ -1 +0,0 @@
[test_http3_perf.js]

View File

@ -0,0 +1,3 @@
[DEFAULT]
["test_http3_perf.js"]

View File

@ -21,7 +21,7 @@ not on all platforms and was specific to the browsertime framework.
`mozperftest` currently provides the `mach perftest` command, that will scan
for all tests that are declared in ini files such as
https://searchfox.org/mozilla-central/source/netwerk/test/perf/perftest.ini and
https://searchfox.org/mozilla-central/source/netwerk/test/perf/perftest.toml and
registered under **PERFTESTS_MANIFESTS** in `moz.build` files such as
https://searchfox.org/mozilla-central/source/netwerk/test/moz.build#17

View File

@ -31,9 +31,9 @@ This is the list of fields:
Tests are registered using tests manifests and the **PERFTESTS_MANIFESTS**
variable in `moz.build` files - it's good practice to name this file
`perftest.ini`.
`perftest.toml`.
Example of such a file: https://searchfox.org/mozilla-central/source/testing/performance/perftest.ini
Example of such a file: https://searchfox.org/mozilla-central/source/testing/performance/perftest.toml
xpcshell
@ -71,7 +71,7 @@ Note that the ``perfMetadata`` variable can exist in any ``<script>...</script>`
perfherder_metrics: [
{ name: "Registration", unit: "ms" },
],
manifest: "perftest.ini",
manifest: "perftest.toml",
manifest_flavor: "plain",
extra_args: [
"headless",

View File

@ -304,7 +304,7 @@ test-manifest:
mach: lint -v -l test-manifest-alpha -l test-manifest-disable -l test-manifest-skip-if -f treeherder -f json:/builds/worker/mozlint.json .
when:
files-changed:
- '**/*.ini'
- '**/*.toml'
- 'python/mozlint/**'
- 'tools/lint/**'
- 'tools/lint/test-disable.yml'
@ -550,7 +550,6 @@ perfdocs-verify:
files-changed:
- 'devtools/perfdocs/**'
- 'taskcluster/**'
- '**/perftest.ini'
- '**/perftest.toml'
- 'python/mozperftest/**'
- 'testing/awsy/**'

View File

@ -15,5 +15,5 @@ SPHINX_TREES["/testing"] = "docs"
DIRS += ["mozbase"]
PERFTESTS_MANIFESTS += [
"performance/perftest.ini",
"performance/perftest.toml",
]

View File

@ -21,7 +21,7 @@ not on all platforms and was specific to the browsertime framework.
`mozperftest` currently provides the `mach perftest` command, that will scan
for all tests that are declared in ini files such as
https://searchfox.org/mozilla-central/source/netwerk/test/perf/perftest.ini and
https://searchfox.org/mozilla-central/source/netwerk/test/perf/perftest.toml and
registered under **PERFTESTS_MANIFESTS** in `moz.build` files such as
https://searchfox.org/mozilla-central/source/netwerk/test/moz.build#17

View File

@ -31,9 +31,9 @@ This is the list of fields:
Tests are registered using tests manifests and the **PERFTESTS_MANIFESTS**
variable in `moz.build` files - it's good practice to name this file
`perftest.ini`.
`perftest.toml`.
Example of such a file: https://searchfox.org/mozilla-central/source/testing/performance/perftest.ini
Example of such a file: https://searchfox.org/mozilla-central/source/testing/performance/perftest.toml
xpcshell
@ -71,7 +71,7 @@ Note that the ``perfMetadata`` variable can exist in any ``<script>...</script>`
perfherder_metrics: [
{ name: "Registration", unit: "ms" },
],
manifest: "perftest.ini",
manifest: "perftest.toml",
manifest_flavor: "plain",
extra_args: [
"headless",

View File

@ -1,11 +0,0 @@
[perftest_android_startup.js]
[perftest_bbc_link.js]
[perftest_facebook.js]
[perftest_jsconf_cold.js]
[perftest_jsconf_warm.js]
[perftest_pageload.js]
[perftest_perfstats.js]
[perftest_politico_link.js]
[perftest_youtube_link.js]
[perftest_WPT_firefox_init_file.js]
[perftest_WPT_chrome_init_file.js]

View File

@ -0,0 +1,23 @@
[DEFAULT]
["perftest_WPT_chrome_init_file.js"]
["perftest_WPT_firefox_init_file.js"]
["perftest_android_startup.js"]
["perftest_bbc_link.js"]
["perftest_facebook.js"]
["perftest_jsconf_cold.js"]
["perftest_jsconf_warm.js"]
["perftest_pageload.js"]
["perftest_perfstats.js"]
["perftest_politico_link.js"]
["perftest_youtube_link.js"]

View File

@ -317,21 +317,9 @@ 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.
Returns a dictionary containing the tests that are in perftest.toml manifest.
:return dict: A dictionary with the following structure: {
"suite_name": {
@ -340,7 +328,7 @@ class MozperftestGatherer(FrameworkGatherer):
},
}
"""
for path in self.get_manifests():
for path in list(pathlib.Path(self.workspace_dir).rglob("perftest.toml")):
if "obj-" in str(path):
continue
suite_name = str(path.parent).replace(str(self.workspace_dir), "")
@ -354,7 +342,7 @@ class MozperftestGatherer(FrameworkGatherer):
# because mozperftest tests exist in multiple places in-tree
PerfDocLogger.PATHS.append(suite_name)
# Get the tests from perftest.ini
# Get the tests from perftest.toml
test_manifest = TestManifest([str(path)], strict=False)
test_list = test_manifest.active_tests(exists=False, disabled=False)
for test in test_list:

View File

@ -279,7 +279,7 @@ def perfdocs_sample():
raptor_another_suitedir.mkdir(parents=True, exist_ok=True)
with temp_file(
"perftest.ini", tempdir=suite_dir, content="[perftest_sample.js]"
"perftest.toml", tempdir=suite_dir, content='["perftest_sample.js"]'
) as tmpmanifest, temp_file(
"raptor_example1.ini", tempdir=raptor_suitedir, content=SAMPLE_INI
) as tmpexample1manifest, temp_file(