← Back to team overview

graphite-dev team mailing list archive

[Question #184877]: A definitive solution to the derivative/scaling issue

 

New question #184877 on Graphite:
https://answers.launchpad.net/graphite/+question/184877

Hi, 

I know this problem has been asked previously but I can't find a good solution. The problem is that the derivative function simply calculates the difference between two metrics without taking into account the timestamp, so, if you sample at a n-minutes pace, the derivative will show values grouped into that sampling rate (normally that imply bigger values). A solution could be to scale the result. This is alright as long as you know the sampling rate, Im currently managing thousand of metrics and the graph creation is automated by means of munin2graphite so this approarch won't work. Another approach would be that of summarizing (i.e. oversampling) the metric before derivation, but this does not work, the result is not equivalent to that of the scaling method. 

Looking into the code, I see, that the TimeSeries has a property called step that I guess is the time difference between points. Wouldn't it be correct to create a new funcion (let's call it timeUnitDerivative), that divide the function increment by the step in the implementation?  If so I can myself send a patch with docu.

Thanks in advance, Jose Fernandez (magec)

-- 
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.