diff options
author | Tibor Frank <tifrank@cisco.com> | 2022-07-15 11:15:05 +0200 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2022-07-18 05:21:27 +0000 |
commit | 06d3f7331f9f10d99baa334b1808dfdc9c6fc8be (patch) | |
tree | c39eb6181f0261101048bedc0ee21f024a01302e /resources/tools/dash/app/pal/report | |
parent | 1b2710767a34113c266c81a18b98d71e0c8dd6ef (diff) |
UTI: Normalize trending data
Change-Id: I6cc2c73707e9e3a0ab0f28033526a612804ee20a
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/dash/app/pal/report')
-rw-r--r-- | resources/tools/dash/app/pal/report/graphs.py | 4 | ||||
-rw-r--r-- | resources/tools/dash/app/pal/report/layout.py | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/resources/tools/dash/app/pal/report/graphs.py b/resources/tools/dash/app/pal/report/graphs.py index 92cf5ca989..0543193d99 100644 --- a/resources/tools/dash/app/pal/report/graphs.py +++ b/resources/tools/dash/app/pal/report/graphs.py @@ -24,6 +24,7 @@ import hdrh.histogram import hdrh.codec +_NORM_FREQUENCY = 2.0 # [GHz] _FREQURENCY = { # [GHz] "2n-aws": 1.000, "2n-dnv": 2.000, @@ -181,7 +182,8 @@ def graph_iterative(data: pd.DataFrame, sel:dict, layout: dict, continue phy = itm["phy"].split("-") topo_arch = f"{phy[0]}-{phy[1]}" if len(phy) == 4 else str() - norm_factor = 2.0 / _FREQURENCY[topo_arch] if normalize else 1.0 + norm_factor = (_NORM_FREQUENCY / _FREQURENCY[topo_arch]) \ + if normalize else 1.0 if itm["testtype"] == "mrr": y_data_raw = itm_data[_VALUE[itm["testtype"]]].to_list()[0] y_data = [y * norm_factor for y in y_data_raw] diff --git a/resources/tools/dash/app/pal/report/layout.py b/resources/tools/dash/app/pal/report/layout.py index d85dbe7657..e7c8db43ae 100644 --- a/resources/tools/dash/app/pal/report/layout.py +++ b/resources/tools/dash/app/pal/report/layout.py @@ -1340,8 +1340,8 @@ class Layout: row_card_sel_tests = self.STYLE_ENABLED row_btns_sel_tests = self.STYLE_ENABLED - if trigger_id in ("btn-ctrl-add", "url", "btn-sel-remove-all", - "btn-sel-remove", "cl-ctrl-normalize"): + if trigger_id in ("btn-ctrl-add", "url", "btn-sel-remove", + "cl-ctrl-normalize"): if store_sel: row_fig_tput, row_fig_lat, row_table, row_btn_dwnld = \ _generate_plotting_area( |