aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJian Cai <jiancai@google.com>2019-07-22 17:10:10 -0700
committerJian Cai <jiancai@google.com>2019-07-25 23:51:26 +0000
commitd3466be7b6dbf2153f093b5a03436561a659a9bd (patch)
tree812751e7b1296ade6d3b7344bac3231614ee297c
parent2b4238f0c37b28e314ab93bdb3afe0545e1bd435 (diff)
downloadtoolchain-utils-d3466be7b6dbf2153f093b5a03436561a659a9bd.tar.gz
toolchain-utils: add block list for histograms output
Histograms of some tests such as loading.desktop are very different from their chart-json counterpart. It seems it is almost impossible to parse these tests without case-by-case parsing. Parse chart-json output of these tests instead. BUG=chromium:984713 TEST=local tests Change-Id: I225567a1be9d401b5dd0c1f682184e581ac4acce Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1714125 Tested-by: Jian Cai <jiancai@google.com> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
-rw-r--r--crosperf/results_cache.py19
1 files changed, 15 insertions, 4 deletions
diff --git a/crosperf/results_cache.py b/crosperf/results_cache.py
index 6124dbee..57b8090c 100644
--- a/crosperf/results_cache.py
+++ b/crosperf/results_cache.py
@@ -29,6 +29,9 @@ MACHINE_FILE = 'machine.txt'
AUTOTEST_TARBALL = 'autotest.tbz2'
PERF_RESULTS_FILE = 'perf-results.txt'
CACHE_KEYS_FILE = 'cache_keys.txt'
+HISTOGRAMS_BLOCKLIST = {
+ 'loading.desktop',
+}
class Result(object):
@@ -251,7 +254,8 @@ class Result(object):
return out
def GetResultsFile(self):
- if self.suite == 'telemetry_Crosperf':
+ if self.suite == 'telemetry_Crosperf' and \
+ self.test_name not in HISTOGRAMS_BLOCKLIST:
return self.FindFilesInResultsDir('-name histograms.json').splitlines()
return self.FindFilesInResultsDir('-name results-chart.json').splitlines()
@@ -264,7 +268,8 @@ class Result(object):
def GetDataMeasurementsFiles(self):
result = self.FindFilesInResultsDir('-name perf_measurements').splitlines()
if not result:
- if self.suite == 'telemetry_Crosperf':
+ if self.suite == 'telemetry_Crosperf' and \
+ self.test_name not in HISTOGRAMS_BLOCKLIST:
result = \
self.FindFilesInResultsDir('-name histograms.json').splitlines()
else:
@@ -450,9 +455,15 @@ class Result(object):
# Note that this function doesn't know anything about whether there is a
# cache hit or miss. It should process results agnostic of the cache hit
# state.
- if self.results_file and self.suite == 'telemetry_Crosperf' and \
- 'histograms.json' in self.results_file[0]:
+ # FIXME: Properly parse histograms results of the tests in the blocklist
+ if self.results_file and \
+ self.suite == 'telemetry_Crosperf' and \
+ 'histograms.json' in self.results_file[0] and \
+ self.test_name not in HISTOGRAMS_BLOCKLIST:
self.keyvals = self.ProcessHistogramsResults()
+ elif self.results_file and self.suite == 'telemetry_Crosperf' and \
+ 'histograms.json' in self.results_file[0]:
+ self.keyvals = self.ProcessChartResults()
elif self.results_file and self.suite != 'telemetry_Crosperf' and \
'results-chart.json' in self.results_file[0]:
self.keyvals = self.ProcessChartResults()