From 5ae1aea05849a69a97f559756e80b9794482f302 Mon Sep 17 00:00:00 2001 From: Tibor Frank Date: Tue, 27 Mar 2018 10:29:52 +0200 Subject: PAL trending: Trending line Change-Id: I46309f53365b9335fc93bcecdf293bca07a0e51d Signed-off-by: Tibor Frank --- resources/tools/presentation/generator_CPTA.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'resources/tools') diff --git a/resources/tools/presentation/generator_CPTA.py b/resources/tools/presentation/generator_CPTA.py index bca5535d43..0c317c05ce 100644 --- a/resources/tools/presentation/generator_CPTA.py +++ b/resources/tools/presentation/generator_CPTA.py @@ -313,8 +313,9 @@ def _generate_trending_traces(in_data, period, moving_win_size=10, traces.append(trace_anomalies) if show_moving_median: + min_periods = moving_win_size / 2 + 1 data_mean_y = pd.Series(data_y).rolling( - window=moving_win_size).median() + window=moving_win_size, min_periods=min_periods).median() trace_median = plgo.Scatter( x=data_x, y=data_mean_y, @@ -324,7 +325,7 @@ def _generate_trending_traces(in_data, period, moving_win_size=10, "width": 1, "color": color, }, - name='{name}-trend'.format(name=name, size=moving_win_size) + name='{name}-trend'.format(name=name) ) traces.append(trace_median) @@ -388,7 +389,7 @@ def _generate_all_charts(spec, input_data): chart_data[test_name][int(idx)] = \ test["result"]["throughput"] except (KeyError, TypeError): - chart_data[test_name][int(idx)] = None + pass # Add items to the csv table: for tst_name, tst_data in chart_data.items(): -- cgit 1.2.3-korg