X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fgenerator_cpta.py;h=d1b6fb082c71ec9e429f01dcec5c2dea1b33144b;hb=d164bef0373edfd2b6cc7d4aaa27b928065df3e5;hp=b4ff42e4e4fc8ec455a1d772c15857cda1297ed5;hpb=3a443e358985f9d90e0ce1a5e9295a28349f26de;p=csit.git diff --git a/resources/tools/presentation/generator_cpta.py b/resources/tools/presentation/generator_cpta.py index b4ff42e4e4..d1b6fb082c 100644 --- a/resources/tools/presentation/generator_cpta.py +++ b/resources/tools/presentation/generator_cpta.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Cisco and/or its affiliates. +# Copyright (c) 2023 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: @@ -838,21 +838,9 @@ def _generate_all_charts(spec, input_data): # Evaluate result: if anomaly_classifications: - test_reg_lst = [] - nic_reg_lst = [] - frmsize_reg_lst = [] - trend_reg_lst = [] - number_reg_lst = [] - ltc_reg_lst = [] - test_prog_lst = [] - nic_prog_lst = [] - frmsize_prog_lst = [] - trend_prog_lst = [] - number_prog_lst = [] - ltc_prog_lst = [] result = u"PASS" - class MaxLens(): + class MaxLens: """Class to store the max lengths of strings displayed in regressions and progressions. """ @@ -874,11 +862,25 @@ def _generate_all_charts(spec, input_data): self.run = run self.ltc = ltc - max_len = MaxLens(0, 0, 0, 0, 0, 0) - for job_name, job_data in anomaly_classifications.items(): data = [] + test_reg_lst = [] + nic_reg_lst = [] + frmsize_reg_lst = [] + trend_reg_lst = [] + number_reg_lst = [] + ltc_reg_lst = [] + test_prog_lst = [] + nic_prog_lst = [] + frmsize_prog_lst = [] + trend_prog_lst = [] + number_prog_lst = [] + ltc_prog_lst = [] + max_len = MaxLens(0, 0, 0, 0, 0, 0) + + # tb - testbed (2n-icx, etc) tb = u"-".join(job_name.split(u"-")[-2:]) + # data - read all txt dashboard files for tb for file in listdir(f"{spec.cpta[u'output-file']}"): if tb in file and u"performance-trending-dashboard" in \ file and u"txt" in file: @@ -933,9 +935,6 @@ def _generate_all_charts(spec, input_data): number_prog_lst.append(number) ltc_prog_lst.append(ltc) - if classification in (u"regression", u"outlier"): - result = u"FAIL" - text = u"" for idx in range(len(test_reg_lst)): text += (