X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fgenerator_tables.py;h=2e7d3dee363cd2126a463d277e14ce99ca7530be;hp=0b063b10670aca8fd8356b7d5d7fea011d124e9c;hb=18f2763797ff782f9068550fc2f01cad4d7056af;hpb=575b935029aa496629f138d0e5f756921b64d1e6 diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py index 0b063b1067..2e7d3dee36 100644 --- a/resources/tools/presentation/generator_tables.py +++ b/resources/tools/presentation/generator_tables.py @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Cisco and/or its affiliates. +# Copyright (c) 2022 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -297,28 +297,15 @@ def table_oper_data_html(table, input_data): threads = dict({idx: list() for idx in range(len(runtime))}) for idx, run_data in runtime.items(): for gnode, gdata in run_data.items(): - if gdata[u"vectors"] > 0: - clocks = gdata[u"clocks"] / gdata[u"vectors"] - elif gdata[u"calls"] > 0: - clocks = gdata[u"clocks"] / gdata[u"calls"] - elif gdata[u"suspends"] > 0: - clocks = gdata[u"clocks"] / gdata[u"suspends"] - else: - clocks = 0.0 - if gdata[u"calls"] > 0: - vectors_call = gdata[u"vectors"] / gdata[u"calls"] - else: - vectors_call = 0.0 - if int(gdata[u"calls"]) + int(gdata[u"vectors"]) + \ - int(gdata[u"suspends"]): - threads[idx].append([ - gnode, - int(gdata[u"calls"]), - int(gdata[u"vectors"]), - int(gdata[u"suspends"]), - clocks, - vectors_call - ]) + threads[idx].append([ + gnode, + int(gdata[u"calls"]), + int(gdata[u"vectors"]), + int(gdata[u"suspends"]), + float(gdata[u"clocks"]), + float(gdata[u"vectors"] / gdata[u"calls"]) \ + if gdata[u"calls"] else 0.0 + ]) bold = ET.SubElement(tcol, u"b") bold.text = ( @@ -972,8 +959,8 @@ def table_perf_trending_dash(table, input_data): header = [ u"Test Case", u"Trend [Mpps]", - u"Number of runs [#]", - u"Trend Change [%]", + u"Runs [#]", + u"Long-Term Change [%]", u"Regressions [#]", u"Progressions [#]" ]