[Ezbench-dev] [PATCH 07/15] report/journal: move the timestamp inside a attribute dict
Martin Peres
martin.peres at linux.intel.com
Mon Jan 30 20:54:05 UTC 2017
From: Martin Peres <martin.peres at free.fr>
This will allow us to store more attributes than just the timestamp.
---
python-modules/ezbench/report.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/python-modules/ezbench/report.py b/python-modules/ezbench/report.py
index 2770edd..20ae903 100644
--- a/python-modules/ezbench/report.py
+++ b/python-modules/ezbench/report.py
@@ -1329,25 +1329,26 @@ class Journal:
continue
# Parse the time
+ attrs = dict()
try:
- timestamp = float(fields[0])
+ attrs["timestamp"] = float(fields[0])
except:
continue
op = fields[1]
key=",".join(fields[2:])
- self.__add_value__(timestamp, op, key)
+ self.__add_value__(op, key, attrs)
except Exception:
pass
- def __add_value__(self, timestamp, op, key):
+ def __add_value__(self, op, key, attrs):
if op not in self._journal:
self._journal[op] = dict()
if key not in self._journal[op]:
- self._journal[op][key] = [timestamp]
+ self._journal[op][key] = [attrs]
else:
- self._journal[op][key].append(timestamp)
+ self._journal[op][key].append(attrs)
def __key_test__(self, version, test_name):
return "{},{}".format(version, test_name)
--
2.11.0
More information about the Ezbench-dev
mailing list