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
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.