зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1788647 - Make the naming of both folder and profile files more expreesive for gecko profile zip files r=perftest-reviewers,sparky
Previously they were named like "1-geckoProfile-1.json.gz" and that wasn't good for a few reasons: - Both numbers were incrementing at the same time, making both numbers unnecessary. - "geckoProfile" word is very redundant since it's used on all the profiles and doesn't add any value/context to the users. Instead this patch converts gecko profile namings to: <test-name>-<test-run-type> - <iteration-type>-<iteration> For example for chimera tests it will show like this: - cnn-pageload-cold - browser-cycle-1 - browser-cycle-2 - cnn-pageload-warm - browser-cycle-1 And non-pageload tests will look like this: - twitch-animation-benchmark - iteration-1 Differential Revision: https://phabricator.services.mozilla.com/D160195
This commit is contained in:
Родитель
409de21453
Коммит
932ad54a58
|
@ -265,6 +265,7 @@ class GeckoProfile(object):
|
|||
self.cleanup = False
|
||||
|
||||
missing_symbols_zip = os.path.join(self.upload_dir, "missingsymbols.zip")
|
||||
test_type = self.test_config.get("type", "pageload")
|
||||
|
||||
try:
|
||||
mode = zipfile.ZIP_DEFLATED
|
||||
|
@ -285,21 +286,27 @@ class GeckoProfile(object):
|
|||
|
||||
try:
|
||||
# Write the profiles into a set of folders formatted as:
|
||||
# <TEST-NAME>-<TEST_TYPE>. The file names have a count prefixed
|
||||
# to them to prevent any naming conflicts. The count is the
|
||||
# number of files already in the folder.
|
||||
folder_name = "%s-%s" % (
|
||||
self.test_config["name"],
|
||||
profile_info["type"],
|
||||
)
|
||||
profile_name = "-".join(
|
||||
[
|
||||
str(
|
||||
len([f for f in arc.namelist() if folder_name in f]) + 1
|
||||
),
|
||||
os.path.split(profile_path)[-1],
|
||||
]
|
||||
# <TEST-NAME>-<TEST-RUN-TYPE>.
|
||||
# <TEST-RUN-TYPE> can be pageload-{warm,cold} or {test-type}
|
||||
# only for the tests that are not a pageload test.
|
||||
# For example, "cnn-pageload-warm".
|
||||
# The file names are formatted as <ITERATION-TYPE>-<ITERATION>
|
||||
# to clearly indicate without redundant information.
|
||||
# For example, "browser-cycle-1".
|
||||
test_run_type = (
|
||||
"{0}-{1}".format(test_type, profile_info["type"])
|
||||
if test_type == "pageload"
|
||||
else test_type
|
||||
)
|
||||
folder_name = "%s-%s" % (self.test_config["name"], test_run_type)
|
||||
iteration = str(os.path.split(profile_path)[-1].split("-")[-1])
|
||||
if test_type == "pageload" and profile_info["type"] == "cold":
|
||||
iteration_type = "browser-cycle"
|
||||
elif profile_info["type"] == "warm":
|
||||
iteration_type = "page-cycle"
|
||||
else:
|
||||
iteration_type = "iteration"
|
||||
profile_name = "-".join([iteration_type, iteration])
|
||||
path_in_zip = os.path.join(folder_name, profile_name)
|
||||
|
||||
LOG.info(
|
||||
|
|
Загрузка…
Ссылка в новой задаче