[autotest] Scheduler, drone_manager, drone_utility stats.
Adds some useful stats to drone manager, handle agents and
drone utility. These stats should help us track processes,
figure out where the drone_manager latency is coming from
and draw correlations between the number of agents scheduled
and drone refresh time.
This cl also moves site_drone_utility's kill_process method
into drone_utility, and modifies the nuke_pids function to only
wait on and kill processes that haven't already died.
TEST=Ran suites.
BUG=chromium:400486
DEPLOY=scheduler
Change-Id: I56e6ee05fa2ae1935435dbc2055d7f99a9a89e5e
Reviewed-on: https://chromium-review.googlesource.com/211769
Reviewed-by: Prashanth B <beeps@chromium.org>
Commit-Queue: Prashanth B <beeps@chromium.org>
Tested-by: Prashanth B <beeps@chromium.org>
diff --git a/scheduler/site_drones.py b/scheduler/site_drones.py
index 2022f64..ff43d92 100644
--- a/scheduler/site_drones.py
+++ b/scheduler/site_drones.py
@@ -10,11 +10,16 @@
"""
- def __init__(self):
+ def __init__(self, timestamp_remote_calls=True):
"""
Add a new private variable _processes_to_kill to _AbstractDrone
+
+ @param timestamp_remote_calls: If true, drone_utility is invoked with
+ the --call_time option and the current time. Currently this is only
+ used for testing.
"""
- super(_SiteAbstractDrone, self).__init__()
+ super(_SiteAbstractDrone, self).__init__(
+ timestamp_remote_calls=timestamp_remote_calls)
self._processes_to_kill = []