Victoriametrics: how deriv() function works?

Created on 21 Jun 2019  路  4Comments  路  Source: VictoriaMetrics/VictoriaMetrics

I tried to use deriv() function and I found that the result does not look like I predicted and much different from Prometheus. Did you use linear regression for this (like in Prom docs)? I can't find anything similar to linear regression in your code. Thanks

enhancement question

All 4 comments

deriv in VictoriaMetrics takes the first and the last point on each interval and calculates derivative based on them - (valueLast - valueFirst) / (timestampLast - timestampFirst). This doesn't match deriv calculation from Prometheus, which uses linear regression for the calculations. Will update deriv calculations in VictoriaMetrics, so it matches the calculations from Prometheus.

deriv() still works a little bit different, but more looks like a Prom. Thanks!

Great! Could you post two graphs for new deriv from Prometheus and VictoriaMetrics with visible discrepancy?

Closing this old question as resolved.

Was this page helpful?
0 / 5 - 0 ratings