X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_hw.c;h=3b1ba7c68612d056bb9fbca84f26131f1d82cb2f;hb=40cc8b00296079815f08c2ff55f134efae83ea69;hp=24cfb1709a6869a72913537228cf447759570fc2;hpb=51fcea2cbf9721f012f2f0d43c604a3aaf684ee8;p=rrdtool.git diff --git a/src/rrd_hw.c b/src/rrd_hw.c index 24cfb17..3b1ba7c 100644 --- a/src/rrd_hw.c +++ b/src/rrd_hw.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.23 Copyright by Tobi Oetiker, 1997-2007 + * RRDtool 1.2.99907080300 Copyright by Tobi Oetiker, 1997-2007 ***************************************************************************** * rrd_hw.c : Support for Holt-Winters Smoothing/ Aberrant Behavior Detection ***************************************************************************** @@ -139,7 +139,14 @@ int apply_smoother( rrd_value_t *working_average; rrd_value_t *baseline; - offset = floor(0.025 * row_count); + if (atoi(rrd->stat_head->version) >= 4) { + offset = floor(rrd->rra_def[rra_idx]. + par[RRA_seasonal_smoothing_window]. + u_val / 2 * row_count); + } else { + offset = floor(0.05 / 2 * row_count); + } + if (offset == 0) return 0; /* no smoothing */