-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
non_negative_difference #7393
Comments
@phemmer should it report the absolute value, or 0 if the value is negative? |
Nither, it should drop the value entirely, just like |
Ah, makes sense. |
@jwilder If no one takes this, I would like to devote my time on this feature. What is your opinion? Is this gonna be ok to adding in |
@zhexuany Sounds good. Thanks! |
It's not better to make an absolute function? This way we could write |
@rafaelncarvalho that's not the same. However something like |
I am so sorry for the delay. I planed to used my Spring Festival break to complete this. @phemmer Plz give me some examples to precisely describe this function. My understanding is that Say we have |
But it covers the same use case! Please, do it. 🐱 @zhexuany, you might want to take a look at the mentioned #7076 and #7093 for some more context on the use case. As resetting counters are so common in systems monitoring, I have no idea how InfluxDB could’ve gone so far without this functionality. Compare → https://prometheus.io/docs/querying/functions/#increase |
Actually no it doesn't. Read the comments on #7076, this is a completely different feature. |
Ah, right, I wanted totals there. But you can get speed from totals (and I do this with my patch). Will I be able to get totals from your speed in #7393? |
PR is ready. Please check: #8235. |
Fixed via #8235 |
Feature Request
Proposal: [Description of the feature]
Add a
non_negative_difference
function, similar tonon_negative_derivative
.Current behavior: [What currently happens]
No such function.
Desired behavior: [What you would like to happen]
Such a function.
Use case: [Why is this important (helps with prioritizing requests)]
For a counter which overflows and is frequently reset, using
difference
results in frequent negative values.Note, this is NOT the same as the feature requested in #7076.
The text was updated successfully, but these errors were encountered: