diff options
author | Tibor Frank <tifrank@cisco.com> | 2018-03-27 10:29:52 +0200 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2018-03-27 08:32:11 +0000 |
commit | 5ae1aea05849a69a97f559756e80b9794482f302 (patch) | |
tree | b13bfaba6f019e144799e7f71130571b8493db4c /resources/tools | |
parent | f788b5aacec85be2c9097b5eb6a473fdebbf22a4 (diff) |
PAL trending: Trending line
Change-Id: I46309f53365b9335fc93bcecdf293bca07a0e51d
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools')
-rw-r--r-- | resources/tools/presentation/generator_CPTA.py | 7 |
1 files changed, 4 insertions, 3 deletions
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(): |