in mozperftest_tools/mozperftest_tools/regression_detector.py [0:0]
def _open_and_organize_perfherder(self, files):
def _open_perfherder(filen):
with open(filen) as f:
return json.load(f)
res = {"cold": {}, "warm": {}}
for filen in files:
data = _open_perfherder(filen)
for suite in data["suites"]:
pl_type = "warm"
if "cold" in suite["extraOptions"]:
pl_type = "cold"
for subtest in suite["subtests"]:
if "cputime" in subtest["name"].lower():
continue
# Each entry here will be a single retrigger of
# the test for the requested metric (ordered
# based on the `files` ordering)
res[pl_type].setdefault(subtest["name"], []).extend(
subtest["replicates"]
)
return res