diff options
author | Caroline Tice <cmtice@google.com> | 2015-09-08 16:28:57 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-09-10 17:05:06 -0700 |
commit | 9b852cfd9a602c5f80c8e621c696b796ce5177fd (patch) | |
tree | 63addd9a3cefaaabdc72b2668226480f84016125 /crosperf/results_organizer.py | |
parent | f63421f72bc7606ce8bfc04ce9acf25e3bf8c4c0 (diff) | |
download | toolchain-utils-9b852cfd9a602c5f80c8e621c696b796ce5177fd.tar.gz |
Store machine description info in cache and json reports.
This CL updates the cache mechanism to store the machine spec
info (the checksum string) in the cache, as well as storing the
machine information in the json reports (to go into the dashboard
archive). It also updates the json reports to always include the
full set of result fields for a test, and it verifies that the
old cache directory exists before trying to remove it.
BUG=None
TEST=Tested in my directory, with --cache_only=True, --rerun=True and
--json_report=True
Change-Id: Ib12bae4ca10141de0b972e3a7aeee83c7b59049b
Reviewed-on: https://chrome-internal-review.googlesource.com/229765
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/results_organizer.py')
-rw-r--r-- | crosperf/results_organizer.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/crosperf/results_organizer.py b/crosperf/results_organizer.py index 0460b6e9..5395d8e4 100644 --- a/crosperf/results_organizer.py +++ b/crosperf/results_organizer.py @@ -29,7 +29,8 @@ class ResultOrganizer(object): ]}. """ - def __init__(self, benchmark_runs, labels, benchmarks=None): + def __init__(self, benchmark_runs, labels, benchmarks=None, + json_report=False): self.result = {} self.labels = [] self.prog = re.compile(r"(\w+)\{(\d+)\}") @@ -40,7 +41,10 @@ class ResultOrganizer(object): self.labels.append(label.name) for benchmark_run in benchmark_runs: benchmark_name = benchmark_run.benchmark.name - show_all_results = benchmark_run.benchmark.show_all_results + if json_report: + show_all_results = True + else: + show_all_results = benchmark_run.benchmark.show_all_results if benchmark_name not in self.result: self.result[benchmark_name] = [] while len(self.result[benchmark_name]) < len(labels): @@ -66,6 +70,10 @@ class ResultOrganizer(object): continue result_value = benchmark_run.result.keyvals[test_key] cur_dict[test_key] = result_value + if json_report and benchmark_run.machine: + cur_dict['machine'] = benchmark_run.machine.name + cur_dict['machine_checksum'] = benchmark_run.machine.checksum + cur_dict['machine_string'] = benchmark_run.machine.checksum_string self._DuplicatePass() def _GetSummaryResults (self, test_name): |