influxdata / flux

Flux is a lightweight scripting language for querying databases (like InfluxDB) and working with data. It's part of InfluxDB 1.7 and 2.0, but can be run independently of those.
https://influxdata.com
MIT License
760 stars 152 forks source link

Increase function should have an optional parameter stating max value of the counter #5396

Closed christofe-lintermans-actemium closed 1 year ago

christofe-lintermans-actemium commented 1 year ago

Hi,

Imagine you are polling each second a counter:

95 ... 97 ... 99 ... 1 ... 3 ... 5

increase would give you 99, 100, 102, 104

but you know in advance the counter actually reached 100 before resetting.

so increase should actually give 101, 103, 105

Could it be possible to pass this known limit to the increase function? so the calculation would be more accurate?

Kind regards,

Christofe

mamosk commented 1 year ago

Hi, I came here to submit the same issue, glad to see you had the same idea! I add a couple of tips:

github-actions[bot] commented 1 year ago

This issue has had no recent activity and will be closed soon.