History log of /external/autotest/site_utils/job_history.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
dfea368e5c830b1d7950ced5ee7b191e3b141ca3 11-Aug-2014 Dan Shi <dshi@chromium.org> [autotest] Add RPC get_host_history to get host history.

The RPC takes in arguments like board, pool or a list of hosts, and return the
history of specified hosts. The history is a dictionary of each host and its
history of status. For example:
{'172.22.33.51': [{'status': 'Resetting'
'start_time': '2014-08-07 10:02:16',
'end_time': '2014-08-07 10:03:16',
'log_url': 'http://autotest/reset-546546/debug',
'task_id': 19441991},
{'status': 'Running'
'start_time': '2014-08-07 10:03:18',
'end_time': '2014-08-07 10:13:00',
'log_url': 'http://autotest/reset-546546/debug',
'job_id': 14995562}
]
}

Add a client util module time_utils to handle common task to do time string
and epoch time conversion.

BUG=chromium:394451
TEST=local setup
from autotest_lib.client.common_lib import global_config
from autotest_lib.server.cros.dynamic_suite import frontend_wrappers
instance_server = global_config.global_config.get_config_value(
'SERVER', 'hostname', type=str)
afe = frontend_wrappers.RetryingAFE(
server=instance_server, timeout_min=60, delay_sec=0)
result = afe.run('get_host_history', board='lumpy', pool='bvt',
start_time='2014-08-05 14:00:00',
end_time='2014-08-06 14:00:00')
import pprint
pprint.pprint(result)
rebuild local afe, test run_suite and create job from afe.

Change-Id: I66ecc5bb69a4a1fdb33437520288ed08e562ed00
Reviewed-on: https://chromium-review.googlesource.com/211772
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Prashanth B <beeps@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
/external/autotest/site_utils/job_history.py
193905e68043c4386ed1d3f21a74d88de4e9a9b7 26-Jul-2014 Dan Shi <dshi@chromium.org> [autotest] Add job history support.

Add a module to be used to collect job history. For example, all special tasks
executed before and after the test job.
Add an rpc get_job_history to afe to get dictionary of the job and its special
tasks' start/end time.

Update AFE to add a button to show job history.

BUG=chromium:394445
TEST=local setup
./site_utils/job_history.py --job_id=4113
http://dshi.mtv.corp.google.com/afe/#tab_id=view_job&object_id=4113

Change-Id: I0da2e77aaf7e2a38158efd6a64d4f924cf0c803d
Reviewed-on: https://chromium-review.googlesource.com/210091
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
/external/autotest/site_utils/job_history.py