Bug 1634185 - Add extra options to visual metrics perfherder data. r=perftest-reviewers,tarek,Bebe

This patch adds the extra options settings to the visual metrics perfherder data by passing it through the jobs.json file.

Differential Revision: https://phabricator.services.mozilla.com/D73277
This commit is contained in:
Gregory Mierzwinski 2020-05-05 14:59:14 +00:00
parent 38f9dabfc7
commit 39d78b2f9d
2 changed files with 8 additions and 1 deletions

View File

@ -47,6 +47,7 @@ JOB_SCHEMA = Schema(
{Required("test_name"): str, Required("browsertime_json_path"): str}
],
Required("application"): {Required("name"): str, "version": str},
Required("extra_options"): [str],
}
)
@ -282,6 +283,8 @@ def main(log, args):
"type": "vismet",
"suites": suites,
}
for entry in suites:
entry["extraOptions"] = jobs_json["extra_options"]
# Validates the perf data complies with perfherder schema.
# The perfherder schema uses jsonschema so we can't use voluptuous here.

View File

@ -663,7 +663,11 @@ class BrowsertimeResultsHandler(PerftestResultsHandler):
if len(video_jobs) > 0:
# The video list and application metadata (browser name and
# optionally version) that will be used in the visual metrics task.
jobs_json = {"jobs": video_jobs, "application": {"name": self.browser_name}}
jobs_json = {
"jobs": video_jobs,
"application": {"name": self.browser_name},
"extra_options": output.summarized_results["suites"][0]["extraOptions"]
}
if self.browser_version is not None:
jobs_json["application"]["version"] = self.browser_version