diff options
author | Han Shen <shenhan@google.com> | 2015-09-18 16:53:34 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-09-24 02:23:46 -0700 |
commit | e066297f07a8d1e1ad3416b4b034b2943f47c648 (patch) | |
tree | 84995ce711005464ef72700701e51841e6b188a2 /crosperf/benchmark_run.py | |
parent | 3c43b87571a5f46b73c62ed92f11b5868e9f38c5 (diff) | |
download | toolchain-utils-e066297f07a8d1e1ad3416b4b034b2943f47c648.tar.gz |
Fix cache reading problem.
The previous implementation images a machine to match the
br(benchmarkrun)'s label before ReadCache is performed, that image step
is a huge waste.
Now re-implemented by starting a few threads at the very beginning to go
through all brs, and put cache-hit brs into _cached_br_list. Then we
start the DutWorker thread to go through _cached_br_list, which does not
require dut to bear any particular image. After this step, we proceed as usual.
Unittest cases also added.
Tested by manullay launch a crosperf and examining no re-image is done.
Change-Id: Ib611937f9fa28ae9bedce8a1a01ed303f14f838a
Reviewed-on: https://chrome-internal-review.googlesource.com/231585
Commit-Ready: Han Shen <shenhan@google.com>
Tested-by: Han Shen <shenhan@google.com>
Reviewed-by: Han Shen <shenhan@google.com>
Diffstat (limited to 'crosperf/benchmark_run.py')
-rw-r--r-- | crosperf/benchmark_run.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/crosperf/benchmark_run.py b/crosperf/benchmark_run.py index 3688647e..e72bc142 100644 --- a/crosperf/benchmark_run.py +++ b/crosperf/benchmark_run.py @@ -94,7 +94,6 @@ class BenchmarkRun(threading.Thread): def run(self): try: - self.ReadCache() if self.result: self._logger.LogOutput("%s: Cache hit." % self.name) @@ -285,11 +284,10 @@ class MockBenchmarkRun(BenchmarkRun): self.label) self.timeline.Record(STATUS_RUNNING) [retval, out, err] = self.suite_runner.Run(machine.name, - self.label.chromeos_root, - self.label.board, - self.benchmark.test_name, - self.test_args, - self.profiler_args) + self.label, + self.benchmark, + self.test_args, + self.profiler_args) self.run_completed = True rr = MockResult("logger", self.label, self.log_level) rr.out = out |