]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commit - src/rrd_rpncalc.c
added PREDICTPERC function
authorMartin Sperl <kernel@martin.sperl.org>
Tue, 6 May 2014 20:12:44 +0000 (20:12 +0000)
committerMartin Sperl <kernel@martin.sperl.org>
Tue, 6 May 2014 20:12:44 +0000 (20:12 +0000)
commitb76b9c7bacf6b0017e8e8990559b4c62079edc9a
tree52450d76fd48c6bd16a0feb7a96c3e0c66c7f4b8
parent203625e38e7914c0753d22a868ee4b9fa08bce8e
added PREDICTPERC function
there is one still open question: should we interpolate to get the final value?
Say: if we have 8 values, and we want thd 95th percventile, then
we should actually take the 6.65th 0-based index value (=95/100*(8-1)).
with the current implementation we round, so we return actually the 100th percentile.
what we could also do is:
value=val[floor(idx)]+(idx-floor(idx))*(val[floor(idx)+1]-val[floor(idx)])
(besides some boundry checking for the explicit percentile 100)

this should get decided prior to final merging
doc/rrdgraph_rpn.pod
src/rrd_graph.c
src/rrd_rpncalc.c
src/rrd_rpncalc.h
src/rrd_update.c