diff options
| author | Martin Peres <martin.peres@linux.intel.com> | 2016-09-28 09:15:11 +0300 |
|---|---|---|
| committer | Martin Peres <martin.peres@linux.intel.com> | 2016-09-28 09:15:11 +0300 |
| commit | 55dde301b44e52bfa48124c267a17c62e7b438e0 (patch) | |
| tree | 72850aa83d1ae192d5d50209b1d96a003a63fcb8 /utils | |
| parent | df7ccbde5d9b90050f00cc2d01b106bcc287ff9e (diff) | |
ezbench.py/report: delete the subtest cache
This drastically reduces the memory usage of enhance_report()
to make it negligeable while not slowing down report
generation.
Diffstat (limited to 'utils')
| -rw-r--r-- | utils/ezbench.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/utils/ezbench.py b/utils/ezbench.py index e548515..f306595 100644 --- a/utils/ezbench.py +++ b/utils/ezbench.py @@ -1833,8 +1833,6 @@ class TestResult: self.unit = None self._results = set() - self._cache_result = None - self.__parse_results__(testType, testFile, runFiles, metricsFiles) def __parse_results__(self, testType, testFile, runFiles, metricsFiles): @@ -1866,13 +1864,9 @@ class TestResult: def result(self, key = None): """ Returns the result associated to the key or None if it does not exist """ - if self._cache_result is None: - self._cache_result = dict() - if key not in self._cache_result: - if len(self.runs) == 0: - raise ValueError('Cannot get the results when there are no runs ({})'.format(self.test_file)) - self._cache_result[key] = SubTestResult(self, self.test, key, self.runs) - return self._cache_result[key] + if len(self.runs) == 0: + raise ValueError('Cannot get the results when there are no runs ({})'.format(self.test_file)) + return SubTestResult(self, self.test, key, self.runs) def results(self, restrict_to_type = None): """ |
