[autotest] Add more timing info for suites
Use job keyvals to keep track of the timing of certain
events that do not map nicely to the start/completion
of jobs. These include:
- Triggering of payload/build artifact downloads
- Completion of staging payloads
- Completion of staging build artifacts (debug symbols, etc)
BUG=chromium-os:30327
TEST=unit, run_suite and look at the glory of additional timestamps.
Change-Id: I2e8f0c148415bdbb2031616f057153b4bd9523ad
Reviewed-on: https://gerrit.chromium.org/gerrit/21578
Commit-Ready: Chris Masone <cmasone@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
diff --git a/frontend/afe/site_rpc_interface.py b/frontend/afe/site_rpc_interface.py
index c727319..6e10504 100644
--- a/frontend/afe/site_rpc_interface.py
+++ b/frontend/afe/site_rpc_interface.py
@@ -5,6 +5,7 @@
__author__ = 'cmasone@chromium.org (Chris Masone)'
import common
+import datetime
import logging
import sys
from autotest_lib.client.common_lib import global_config
@@ -63,12 +64,19 @@
"""
# All suite names are assumed under test_suites/control.XX.
suite_name = canonicalize_suite_name(suite_name)
+
+ timings = {}
+ time_fmt = '%Y-%m-%d %H:%M:%S'
# Ensure components of |build| necessary for installing images are staged
# on the dev server. However set synchronous to False to allow other
# components to be downloaded in the background.
ds = dev_server.DevServer.create()
+ timings['download_started_time'] = datetime.datetime.now().strftime(
+ time_fmt)
if not ds.trigger_download(build, synchronous=False):
raise StageBuildFailure("Server error while staging " + build)
+ timings['payload_finished_time'] = datetime.datetime.now().strftime(
+ time_fmt)
getter = control_file_getter.DevServerGetter.create(build, ds)
# Get the control file for the suite.
@@ -87,4 +95,5 @@
priority='Medium',
control_type='Server',
control_file=control_file,
- hostless=True)
+ hostless=True,
+ keyvals=timings)