diff options
author | Tibor Frank <tifrank@cisco.com> | 2021-06-22 13:49:05 +0200 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2021-06-22 14:30:05 +0200 |
commit | 7c7cad880bb72b19671fec71b3f5d1350995161e (patch) | |
tree | 3a3e4e13e22e617e1caf2b08d01be9dcdb431161 /resources/tools/presentation/generator_tables.py | |
parent | b3881e8cb219865423bc578c1e65324e15336847 (diff) |
PAL: Do not read sh run for trending
Change-Id: I0e142c1c3bb48ddeb0bcd2bfa11c0323461c1368
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/presentation/generator_tables.py')
-rw-r--r-- | resources/tools/presentation/generator_tables.py | 7 |
1 files changed, 5 insertions, 2 deletions
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] |