author | Florian Forster <octo@collectd.org> | |
Wed, 12 Oct 2016 07:15:49 +0000 (09:15 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Sun, 27 Nov 2016 06:55:29 +0000 (07:55 +0100) | ||
commit | db8b1cda4841f45af22d149c6bfc575e79289f75 | |
tree | 4b541658481c3aa97857275aa1c1718feac9cc00 | tree | snapshot |
parent | f66916deea905254061bb07245e007471faf2ecf | commit | diff |
src/utils_latency.[ch]: get_rate(): Make lower bound exclusive.
This has a bunch of benefits:
* You can easily iterate over a range of latencies without counting
latencies twice. This was previously tricky because both borders were
considered to be inclusive.
* When lower equals upper, the returned value is now zero.
Previously, it was a value very close to zero, but not zero. The exact
value depended on the bucket width, an information not easily
available to the caller.
This has a bunch of benefits:
* You can easily iterate over a range of latencies without counting
latencies twice. This was previously tricky because both borders were
considered to be inclusive.
* When lower equals upper, the returned value is now zero.
Previously, it was a value very close to zero, but not zero. The exact
value depended on the bucket width, an information not easily
available to the caller.
src/utils_latency.c | diff | blob | history | |
src/utils_latency.h | diff | blob | history | |
src/utils_latency_test.c | diff | blob | history |