[rrd-developers] NAN-safe ADD
rrdtool at nospam.verplant.org
Thu Mar 6 12:25:12 CET 2008
On Thu, Mar 06, 2008 at 05:13:53AM +0100, Alex van den Bogaerdt wrote:
> I can see the following Q&A happening on the mailinglist, often:
> Q: how to fix this?
> A: use 'ADDNAN' instead of '+' <period>
in my opinion, the user knows better than the application, which has
been the UNIX assumption for decades.
Also I don't think it's helpful to think of RRDTool as a monitoring
solution. If something breaks, some other program should alert the user.
It's not RRDTool's job.
Last but not least, I'm having the problem regularly. The problem is
that first you convert all NaNs to zeros. Then you perform your
calculation. And then you have to check if ALL values were NaN and
change the result to NaN again. Having an operator that's doing that is
an excellent idea.
Tobi, that last step, converting back to NaN if everything is NaN, is
why I'd prefer this special operator over a `NANORZERO' commad - the
if-construction is easy enough.
Actually, I'd like to propose an even simpler syntax for the operator:
I'd simply append a `!' (exclamation mark) to the operators `+', `-',
`*', and `/', i. e. `+!', `-!', `*!', and `/!'. Just an idea though.
Florian octo Forster
Hacker in training
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://lists.oetiker.ch/pipermail/rrd-developers/attachments/20080306/f5205050/attachment-0001.bin
More information about the rrd-developers