X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fgenerator_tables.py;h=38439bac5c7ce1bc4b7164e0c795752e33235c9c;hp=0b92db6991d78bf7f5ed2b09dc0a490065cbed53;hb=5646509aea6b43ef1efb282aad908289cc005b26;hpb=06027cf4a33ff75146cbf5e91b029dc801158797 diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py index 0b92db6991..38439bac5c 100644 --- a/resources/tools/presentation/generator_tables.py +++ b/resources/tools/presentation/generator_tables.py @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. +# Copyright (c) 2018 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: @@ -730,13 +730,13 @@ def table_performance_trending_dashboard(table, input_data): data = input_data.filter_data(table, continue_on_error=True) # Prepare the header of the tables - header = ["Test Case", + header = [" Test Case", "Trend [Mpps]", - "Short-Term Change [%]", - "Long-Term Change [%]", - "Regressions [#]", - "Progressions [#]", - "Outliers [#]" + " Short-Term Change [%]", + " Long-Term Change [%]", + " Regressions [#]", + " Progressions [#]", + " Outliers [#]" ] header_str = ",".join(header) + "\n" @@ -745,6 +745,8 @@ def table_performance_trending_dashboard(table, input_data): for job, builds in table["data"].items(): for build in builds: for tst_name, tst_data in data[job][str(build)].iteritems(): + if tst_name.lower() in table["ignore-list"]: + continue if tbl_dict.get(tst_name, None) is None: name = "{0}-{1}".format(tst_data["parent"].split("-")[0], "-".join(tst_data["name"]. @@ -775,8 +777,9 @@ def table_performance_trending_dashboard(table, input_data): stdev_t = data_t.rolling(window=win_size, min_periods=2).std() median_first_idx = pd_data.size - long_win_size try: - max_median = max([x for x in median_t.values[median_first_idx:] - if not isnan(x)]) + max_median = max( + [x for x in median_t.values[median_first_idx:-win_size] + if not isnan(x)]) except ValueError: max_median = nan try: @@ -819,9 +822,6 @@ def table_performance_trending_dashboard(table, input_data): rel_change_long = round( ((last_median_t - max_median) / max_median) * 100, 2) - logging.info("rel_change_last : {}".format(rel_change_last)) - logging.info("rel_change_long : {}".format(rel_change_long)) - tbl_lst.append( [name, '-' if isnan(last_median_t) else