From 7c7cad880bb72b19671fec71b3f5d1350995161e Mon Sep 17 00:00:00 2001 From: Tibor Frank Date: Tue, 22 Jun 2021 13:49:05 +0200 Subject: PAL: Do not read sh run for trending Change-Id: I0e142c1c3bb48ddeb0bcd2bfa11c0323461c1368 Signed-off-by: Tibor Frank --- resources/tools/presentation/generator_tables.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'resources/tools/presentation/generator_tables.py') diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py index d66a8fc3cf..8218084f71 100644 --- a/resources/tools/presentation/generator_tables.py +++ b/resources/tools/presentation/generator_tables.py @@ -24,6 +24,7 @@ from xml.etree import ElementTree as ET from datetime import datetime as dt from datetime import timedelta from copy import deepcopy +from json import loads import plotly.graph_objects as go import plotly.offline as ploff @@ -187,14 +188,16 @@ def table_oper_data_html(table, input_data): tcol.text = u"No Data" continue + runtime = loads(dut_data[u"runtime"]) + try: - threads_nr = len(dut_data[u"runtime"][0][u"clocks"]) + threads_nr = len(runtime[0][u"clocks"]) except (IndexError, KeyError): tcol.text = u"No Data" continue threads = OrderedDict({idx: list() for idx in range(threads_nr)}) - for item in dut_data[u"runtime"]: + for item in runtime: for idx in range(threads_nr): if item[u"vectors"][idx] > 0: clocks = item[u"clocks"][idx] / item[u"vectors"][idx] -- cgit 1.2.3-korg