app/vmselect/promql: adjust ttf calculation, so deriv(freev) for freev=m[d] could be properly calculated

This commit is contained in:
Aliaksandr Valialkin 2019-06-23 14:31:19 +03:00
parent c9cbf5351c
commit 3b3b2f1e6e

View file

@ -18,7 +18,7 @@ func getDefaultWithArgExprs() []*withArgExpr {
// ttf - time to fuckup // ttf - time to fuckup
`ttf(freev) = smooth_exponential( `ttf(freev) = smooth_exponential(
clamp_max(clamp_min(freev, 0) / clamp_min(deriv(-freev), 0), 365*24*3600), clamp_max(clamp_max(-freev, 0) / clamp_max(deriv(freev), 0), 365*24*3600),
clamp_max(step()/300, 1) clamp_max(step()/300, 1)
)`, )`,