diff options
author | Yunlian Jiang <yunlian@google.com> | 2013-04-23 15:05:05 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-06-06 13:52:33 -0700 |
commit | 04dc5dc8547dbfbe524cf35ac39537346ad749bb (patch) | |
tree | fdb51e46da30efec2fbf310670b7ad5f5ce8be43 /crosperf/machine_manager.py | |
parent | 9fc991900056e20bb940eed243dad0c0516d497b (diff) | |
download | toolchain-utils-04dc5dc8547dbfbe524cf35ac39537346ad749bb.tar.gz |
Adding support of telemetry to crosperf
BUG=None
TEST=run crosperf with pyauto/telemetry test with/without cache.
all pass.
Change-Id: If07ac020a9107a79d5780a58fd6dcc924d07f07f
Reviewed-on: https://gerrit-int.chromium.org/36594
Reviewed-by: Luis Lozano <llozano@chromium.org>
Commit-Queue: Yunlian Jiang <yunlian@google.com>
Tested-by: Yunlian Jiang <yunlian@google.com>
Reviewed-on: https://gerrit-int.chromium.org/39241
Reviewed-by: Yunlian Jiang <yunlian@google.com>
Diffstat (limited to 'crosperf/machine_manager.py')
-rw-r--r-- | crosperf/machine_manager.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/crosperf/machine_manager.py b/crosperf/machine_manager.py index 957c8304..e12796ed 100644 --- a/crosperf/machine_manager.py +++ b/crosperf/machine_manager.py @@ -30,7 +30,7 @@ class CrosMachine(object): self.checksum = None self.locked = False self.released_time = time.time() - self.autotest_run = None + self.test_run = None self.chromeos_root = chromeos_root if not self.IsReachable(): self.machine_checksum = None @@ -55,7 +55,7 @@ class CrosMachine(object): def _ParseMemoryInfo(self): line = self.meminfo.splitlines()[0] usable_kbytes = int(line.split()[1]) - # This code is from src/third_party/autotest/files/client/bin/base_utils.py + # This code is from src/third_party/test/files/client/bin/base_utils.py # usable_kbytes is system's usable DRAM in kbytes, # as reported by memtotal() from device /proc/meminfo memtotal # after Linux deducts 1.5% to 9.5% for system table overhead @@ -303,13 +303,13 @@ class MachineManager(object): if not machine.locked]: if m.checksum == image_checksum: m.locked = True - m.autotest_run = threading.current_thread() + m.test_run = threading.current_thread() return m for m in [machine for machine in self.GetAvailableMachines(label) if not machine.locked]: if not m.checksum: m.locked = True - m.autotest_run = threading.current_thread() + m.test_run = threading.current_thread() return m # This logic ensures that threads waiting on a machine will get a machine # with a checksum equal to their image over other threads. This saves time @@ -321,7 +321,7 @@ class MachineManager(object): if not machine.locked]: if time.time() - m.released_time > 20: m.locked = True - m.autotest_run = threading.current_thread() + m.test_run = threading.current_thread() return m return None @@ -369,18 +369,18 @@ class MachineManager(object): "Checksum") table = [header] for m in self._machines: - if m.autotest_run: - autotest_name = m.autotest_run.name - autotest_status = m.autotest_run.timeline.GetLastEvent() + if m.test_run: + test_name = m.test_run.name + test_status = m.test_run.timeline.GetLastEvent() else: - autotest_name = "" - autotest_status = "" + test_name = "" + test_status = "" try: machine_string = stringify_fmt % (m.name, - autotest_name, + test_name, m.locked, - autotest_status, + test_status, m.checksum) except Exception: machine_string = "" @@ -414,7 +414,7 @@ class MockCrosMachine(CrosMachine): self.checksum = None self.locked = False self.released_time = time.time() - self.autotest_run = None + self.test_run = None self.chromeos_root = chromeos_root self.checksum_string = re.sub("\d", "", name) #In test, we assume "lumpy1", "lumpy2" are the same machine. |