Bug 1750599 - Keep track of the time spent running valgrind on perfherder. r=firefox-build-system-reviewers,mhentges

Differential Revision: https://phabricator.services.mozilla.com/D136308
This commit is contained in:
Mike Hommey 2022-01-19 22:27:48 +00:00
Родитель 77e267d014
Коммит a3c1255269
1 изменённых файлов: 27 добавлений и 0 удалений

Просмотреть файл

@ -8,6 +8,7 @@ import json
import logging
import mozinfo
import os
import time
from mach.decorators import (
Command,
@ -174,8 +175,34 @@ def valgrind_test(command_context, suppressions):
env=env,
process_args=kp_kwargs,
)
start_time = time.monotonic()
runner.start(debug_args=valgrind_args)
exitcode = runner.wait(timeout=timeout)
end_time = time.monotonic()
if "MOZ_AUTOMATION" in os.environ:
data = {
"framework": {"name": "build_metrics"},
"suites": [
{
"name": "valgrind",
"value": end_time - start_time,
"lowerIsBetter": True,
"shouldAlert": False,
"subtests": [],
}
],
}
if "TASKCLUSTER_INSTANCE_TYPE" in os.environ:
# Include the instance type so results can be grouped.
data["suites"][0]["extraOptions"] = [
"taskcluster-%s" % os.environ["TASKCLUSTER_INSTANCE_TYPE"],
]
command_context.log(
logging.INFO,
"valgrind-perfherder",
{"data": json.dumps(data)},
"PERFHERDER_DATA: {data}",
)
except BinaryNotFoundException as e:
binary_not_found_exception = e
finally: