Autotest TKO parser now sends measured perf data to chrome's performance dashboard.
Any performance autotests that invoke self.output_perf_value() will now
have those outputted results uploaded to chrome's performance dashboard,
as part of the autotest TKO parsing stage. For now, a message is logged
to the .parse.log output file indicating success or failure of the
upload. In the future, failed uploads will need to be retried, and
better insight will need to be provided as to how well the perf_uploader
module is performing.
BUG=chromium:258232
TEST=Invoked platform_GesturesRegressionTest using a local instance of
the autotest frontend, and a local instance of Chrome team's perf
dashboard. Then verified that the perf data outputted by the test appeared
on the perf dashboard. Also verified that perf_uploader_unittest.py passes.
Change-Id: Id685deda129056465350a5be8effc9aa97fa9bb4
Reviewed-on: https://gerrit.chromium.org/gerrit/64672
Commit-Queue: Dennis Jeffrey <dennisjeffrey@chromium.org>
Reviewed-by: Dennis Jeffrey <dennisjeffrey@chromium.org>
Tested-by: Dennis Jeffrey <dennisjeffrey@chromium.org>
diff --git a/tko/parse.py b/tko/parse.py
index 1bf0217..ef7971a 100755
--- a/tko/parse.py
+++ b/tko/parse.py
@@ -4,7 +4,9 @@
import common
from autotest_lib.client.common_lib import mail, pidfile
-from autotest_lib.tko import db as tko_db, utils as tko_utils, status_lib, models
+from autotest_lib.tko import db as tko_db, utils as tko_utils
+from autotest_lib.tko import models, status_lib
+from autotest_lib.tko.perf_upload import perf_uploader
from autotest_lib.client.common_lib import utils
@@ -159,6 +161,10 @@
# write the job into the database
db.insert_job(jobname, job)
+ # Upload perf values to the perf dashboard, if applicable.
+ for test in job.tests:
+ perf_uploader.upload_test(job, test)
+
# Serializing job into a binary file
try:
from autotest_lib.tko import tko_pb2