From: Tibor Frank Date: Tue, 17 Apr 2018 11:43:04 +0000 (+0200) Subject: Report, trending X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F48%2F11848%2F1;p=csit.git Report, trending Change-Id: Ib71be16f2ddf172c381b43d289a9a0000dad10b6 Signed-off-by: Tibor Frank --- diff --git a/docs/cpta/index.rst b/docs/cpta/index.rst index 8083ff4697..efad502c5a 100644 --- a/docs/cpta/index.rst +++ b/docs/cpta/index.rst @@ -1,24 +1,11 @@ Continuous Performance Trending and Analysis ============================================ -VPP Performance Trending Dashboard ----------------------------------- - -1t1c -```` - -.. include:: ../../_build/_static/vpp/performance-trending-dashboard-1t1c.rst - -2t2c -```` - -.. include:: ../../_build/_static/vpp/performance-trending-dashboard-2t2c.rst - -4t4c -```` - -.. include:: ../../_build/_static/vpp/performance-trending-dashboard-4t4c.rst - +This auto-generated document contains VPP performance trending graphs and data. +It is generated using CSIT continuous trending test and analysis jobs and is +updated daily. More detail is available on +`CSIT Performance Trending and Analysis `_ +wiki page. Contents -------- diff --git a/docs/cpta/introduction/index.rst b/docs/cpta/introduction/index.rst index 5d31b33328..31da9aeb18 100644 --- a/docs/cpta/introduction/index.rst +++ b/docs/cpta/introduction/index.rst @@ -1,8 +1,47 @@ -VPP Performance Trending -======================== - -This auto-generated document contains VPP performance trending graphs and data. -It is generated using CSIT continuous trending test and analysis jobs and is -updated daily. More detail is available on -`CSIT Performance Trending and Analysis `_ -wiki page. +VPP MRR Performance Dashboard +============================= + +Description +----------- + +Dashboard tables list a summary of per test-case VPP MRR performance trend +values and detected anomalies (Maximum Receive Rate - received packet rate +under line rate load). Data comes from trending MRR jobs executed every 12 hrs +(2:00, 14:00 UTC). Trend and anomaly calculations are done over a rolling +window of samples, currently with N=14 covering last 7 days. Separate +tables are generated for tested VPP worker-thread-core combinations (1t1c, +2t2c, 4t4c). + +Legend to table: + + - "Test case": name of CSIT test case, naming convention here + `CSIT/csit-test-naming `_ + - "Thput trend [Mpps]": last value of trend over rolling window. + - "Anomaly value [Mpps]": in precedence - i) highest outlier if 3 + consecutive outliers, ii) highest regression if regressions detected, + iii) highest progression if progressions detected, iv) nil if normal i.e. + within trend. + - "Anomaly vs. Trend [%]": anomaly value vs. trend value. + - "Classification": outlier, regression, progression, normal - observed + over a rolling window. + - "# Outliers": number of outliers detected. + +Tables are listed in sections 1.x. Followed by daily trending graphs in +sections 2.x. Daily trending data used to generate the graphs is listed in +sections 3.x. + +VPP worker on 1t1c +------------------ + +.. include:: ../../../_build/_static/vpp/performance-trending-dashboard-1t1c.rst + +VPP worker on 2t2c +------------------ + +.. include:: ../../../_build/_static/vpp/performance-trending-dashboard-2t2c.rst + +VPP worker on 4t4c +------------------ + +.. include:: ../../../_build/_static/vpp/performance-trending-dashboard-4t4c.rst + diff --git a/resources/tools/presentation/generator_CPTA.py b/resources/tools/presentation/generator_CPTA.py index 7544f3b6f8..c3784e94ef 100644 --- a/resources/tools/presentation/generator_CPTA.py +++ b/resources/tools/presentation/generator_CPTA.py @@ -199,7 +199,7 @@ def _evaluate_results(in_data, trimmed_data, window=10): return results -def _generate_trending_traces(in_data, period, moving_win_size=10, +def _generate_trending_traces(in_data, build_info, period, moving_win_size=10, fill_missing=True, use_first=False, show_moving_median=True, name="", color=""): """Generate the trending traces: @@ -208,6 +208,7 @@ def _generate_trending_traces(in_data, period, moving_win_size=10, - outliers, regress, progress :param in_data: Full data set. + :param build_info: Information about the builds. :param period: Sampling period. :param moving_win_size: Window size. :param fill_missing: If the chosen sample is missing in the full set, its @@ -217,6 +218,7 @@ def _generate_trending_traces(in_data, period, moving_win_size=10, :param name: Name of the plot :param color: Name of the color for the plot. :type in_data: OrderedDict + :type build_info: dict :type period: int :type moving_win_size: int :type fill_missing: bool @@ -232,8 +234,15 @@ def _generate_trending_traces(in_data, period, moving_win_size=10, in_data = _select_data(in_data, period, fill_missing=fill_missing, use_first=use_first) - + # try: + # data_x = ["{0}/{1}".format(key, build_info[str(key)][1].split("~")[-1]) + # for key in in_data.keys()] + # except KeyError: + # data_x = [key for key in in_data.keys()] + hover_text = ["vpp-build: {0}".format(x[1].split("~")[-1]) + for x in build_info.values()] data_x = [key for key in in_data.keys()] + data_y = [val for val in in_data.values()] data_pd = pd.Series(data_y, index=data_x) @@ -244,6 +253,11 @@ def _generate_trending_traces(in_data, period, moving_win_size=10, anomalies = pd.Series() anomalies_res = list() for idx, item in enumerate(in_data.items()): + # item_pd = pd.Series([item[1], ], + # index=["{0}/{1}". + # format(item[0], + # build_info[str(item[0])][1].split("~")[-1]), + # ]) item_pd = pd.Series([item[1], ], index=[item[0], ]) if item[0] in outliers.keys(): anomalies = anomalies.append(item_pd) @@ -276,6 +290,8 @@ def _generate_trending_traces(in_data, period, moving_win_size=10, "color": color, "symbol": "circle", }, + text=hover_text, + hoverinfo="x+y+text+name" ) traces = [trace_samples, ] @@ -373,19 +389,28 @@ def _generate_all_charts(spec, input_data): builds_lst.append(str(build["build"])) # Get "build ID": "date" dict: - build_dates = dict() + build_info = OrderedDict() for build in builds_lst: try: - build_dates[build] = \ - input_data.metadata(job_name, build)["generated"][:14] + build_info[build] = ( + input_data.metadata(job_name, build)["generated"][:14], + input_data.metadata(job_name, build)["version"] + ) except KeyError: - pass + build_info[build] = ("", "") + logging.info("{}: {}, {}".format(build, + build_info[build][0], + build_info[build][1])) # Create the header: csv_table = list() header = "Build Number:," + ",".join(builds_lst) + '\n' csv_table.append(header) - header = "Build Date:," + ",".join(build_dates.values()) + '\n' + build_dates = [x[0] for x in build_info.values()] + header = "Build Date:," + ",".join(build_dates) + '\n' + csv_table.append(header) + vpp_versions = [x[1] for x in build_info.values()] + header = "VPP Version:," + ",".join(vpp_versions) + '\n' csv_table.append(header) results = list() @@ -422,7 +447,7 @@ def _generate_all_charts(spec, input_data): for period in chart["periods"]: # Generate traces: traces = list() - win_size = 10 if period == 1 else 5 if period < 20 else 3 + win_size = 14 if period == 1 else 5 if period < 20 else 3 idx = 0 for test_name, test_data in chart_data.items(): if not test_data: @@ -432,6 +457,7 @@ def _generate_all_charts(spec, input_data): test_name = test_name.split('.')[-1] trace, result = _generate_trending_traces( test_data, + build_info=build_info, period=period, moving_win_size=win_size, fill_missing=True, @@ -474,7 +500,11 @@ def _generate_all_charts(spec, input_data): row[idx] = str(round(float(item) / 1000000, 2)) except ValueError: pass - txt_table.add_row(row) + try: + txt_table.add_row(row) + except Exception as err: + logging.warning("Error occurred while generating TXT table:" + "\n{0}".format(err)) line_nr += 1 txt_table.align["Build Number:"] = "l" with open("{0}.txt".format(file_name), "w") as txt_file: diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py index 985c787d2c..29e1006950 100644 --- a/resources/tools/presentation/generator_tables.py +++ b/resources/tools/presentation/generator_tables.py @@ -606,7 +606,7 @@ def table_performance_comparison_mrr(table, input_data): item.append(round(stdev(data_t) / 1000000, 2)) else: item.extend([None, None]) - if item[1] is not None and item[3] is not None: + if item[1] is not None and item[3] is not None and item[1] != 0: item.append(int(relative_change(float(item[1]), float(item[3])))) if len(item) == 6: tbl_lst.append(item) @@ -747,8 +747,10 @@ def table_performance_trending_dashboard(table, input_data): classification = "outlier" elif "progression" in classification_lst[first_idx:]: classification = "progression" - else: + elif "normal" in classification_lst[first_idx:]: classification = "normal" + else: + classification = None idx = len(classification_lst) - 1 while idx: @@ -770,7 +772,7 @@ def table_performance_trending_dashboard(table, input_data): # Sort the table according to the classification tbl_sorted = list() - for classification in ("regression", "outlier", "progression", "normal"): + for classification in ("regression", "progression", "outlier", "normal"): tbl_tmp = [item for item in tbl_lst if item[4] == classification] tbl_tmp.sort(key=lambda rel: rel[0]) tbl_sorted.extend(tbl_tmp) diff --git a/resources/tools/presentation/input_data_parser.py b/resources/tools/presentation/input_data_parser.py index 7adc9c085b..71665d143d 100644 --- a/resources/tools/presentation/input_data_parser.py +++ b/resources/tools/presentation/input_data_parser.py @@ -250,7 +250,7 @@ class ExecutionChecker(ResultVisitor): self._data["metadata"]["version"] = self._version self._msg_type = None - logging.debug(" VPP version: {0}".format(self._version)) + logging.info(" VPP version: {0}".format(self._version)) def _get_vat_history(self, msg): """Called when extraction of VAT command history is required. diff --git a/resources/tools/presentation/specification_CPTA.yaml b/resources/tools/presentation/specification_CPTA.yaml index fcc2bd929c..4fec3d3578 100644 --- a/resources/tools/presentation/specification_CPTA.yaml +++ b/resources/tools/presentation/specification_CPTA.yaml @@ -224,7 +224,7 @@ # to present all tests. nr-of-tests-shown: 20 outlier-const: 1.5 - window: 10 + window: 14 evaluated-window: 14 - @@ -243,7 +243,7 @@ # to present all tests. nr-of-tests-shown: 20 outlier-const: 1.5 - window: 10 + window: 14 evaluated-window: 14 - @@ -262,7 +262,7 @@ # to present all tests. nr-of-tests-shown: 20 outlier-const: 1.5 - window: 10 + window: 14 evaluated-window: 14 -