aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/input_data_parser.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2019-07-30 14:12:46 +0200
committerTibor Frank <tifrank@cisco.com>2019-07-30 14:12:46 +0200
commit52ebb67e52800f4240001d117d56d08d78a84d6a (patch)
tree388d3b22d632654f28e7dac1ad8283d1c93d1b71 /resources/tools/presentation/input_data_parser.py
parent82397b4141e65f03394edafedefc002771bba5b8 (diff)
Trending: Reduce input data
Change-Id: Ifddbdc1f357a192af558079a92f4e4d1d2693efd Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/presentation/input_data_parser.py')
-rw-r--r--resources/tools/presentation/input_data_parser.py47
1 files changed, 29 insertions, 18 deletions
diff --git a/resources/tools/presentation/input_data_parser.py b/resources/tools/presentation/input_data_parser.py
index 84245c429c..6da428e1bb 100644
--- a/resources/tools/presentation/input_data_parser.py
+++ b/resources/tools/presentation/input_data_parser.py
@@ -1337,30 +1337,41 @@ class InputData(object):
logging.info("Done.")
+ logging.info("Collecting data:")
+
while not data_queue.empty():
- result = data_queue.get()
- job = result["job"]
- build_nr = result["build"]["build"]
+ try:
+ result = data_queue.get()
+
+ job = result["job"]
+ build_nr = result["build"]["build"]
+
+ logging.info(" {job}-{build}".format(job=job, build=build_nr))
+
+ if result["data"]:
+ data = result["data"]
+ build_data = pd.Series({
+ "metadata": pd.Series(data["metadata"].values(),
+ index=data["metadata"].keys()),
+ "suites": pd.Series(data["suites"].values(),
+ index=data["suites"].keys()),
+ "tests": pd.Series(data["tests"].values(),
+ index=data["tests"].keys())})
+
+ if self._input_data.get(job, None) is None:
+ self._input_data[job] = pd.Series()
+ self._input_data[job][str(build_nr)] = build_data
- if result["data"]:
- data = result["data"]
- build_data = pd.Series({
- "metadata": pd.Series(data["metadata"].values(),
- index=data["metadata"].keys()),
- "suites": pd.Series(data["suites"].values(),
- index=data["suites"].keys()),
- "tests": pd.Series(data["tests"].values(),
- index=data["tests"].keys())})
+ self._cfg.set_input_file_name(job, build_nr,
+ result["build"]["file-name"])
- if self._input_data.get(job, None) is None:
- self._input_data[job] = pd.Series()
- self._input_data[job][str(build_nr)] = build_data
+ self._cfg.set_input_state(job, build_nr, result["state"])
- self._cfg.set_input_file_name(job, build_nr,
- result["build"]["file-name"])
+ except (MemoryError, EOFError) as err:
+ logging.error(repr(err))
+ raise
- self._cfg.set_input_state(job, build_nr, result["state"])
del data_queue