aboutsummaryrefslogtreecommitdiff
path: root/crosperf/benchmark_run.py
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@google.com>2015-10-14 11:15:17 -0700
committerchrome-bot <chrome-bot@chromium.org>2015-10-14 15:57:19 -0700
commit515533979584c2d763bed2a0f79255c5fa4da5e7 (patch)
tree1d1aeea55502a44415c8eb9e2349138e01fe6389 /crosperf/benchmark_run.py
parent1efd02bef790dea5f60419a7e333e020f65a46ac (diff)
downloadtoolchain-utils-515533979584c2d763bed2a0f79255c5fa4da5e7.tar.gz
Make sure benchmark_runs check the cache for non-schedv2 paths.
The recent changes for schedv2 caused the cache to NOT be read/checked if we were not using schedv2. This fixes that problem. BUG=None TEST=Tested in my directory with and without --noschedv2 flag. Change-Id: I638b22554f72cf1ea0fdc4e91a326218febbf250 Reviewed-on: https://chrome-internal-review.googlesource.com/234251 Commit-Ready: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com> Reviewed-by: Han Shen <shenhan@google.com>
Diffstat (limited to 'crosperf/benchmark_run.py')
-rw-r--r--crosperf/benchmark_run.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/crosperf/benchmark_run.py b/crosperf/benchmark_run.py
index e72bc142..66bb87b5 100644
--- a/crosperf/benchmark_run.py
+++ b/crosperf/benchmark_run.py
@@ -62,6 +62,7 @@ class BenchmarkRun(threading.Thread):
self.timeline = timeline.Timeline()
self.timeline.Record(STATUS_PENDING)
self.share_cache = share_cache
+ self.cache_has_been_read = False
# This is used by schedv2.
self.owner_thread = None
@@ -91,9 +92,12 @@ class BenchmarkRun(threading.Thread):
self.result = self.cache.ReadResult()
self.cache_hit = (self.result is not None)
+ self.cache_has_been_read = True
def run(self):
try:
+ if not self.cache_has_been_read:
+ self.ReadCache()
if self.result:
self._logger.LogOutput("%s: Cache hit." % self.name)