-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[collectd 6] Introduce a floating point counter type. #4266
Conversation
9b5ded8
to
355f01b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed just daemon/
dir stuff. I'll check rest once the dependent PR is merged.
Some compilers don't like empty statements, e.g.: ``` src/utils/format_kairosdb/format_kairosdb.c:122:8: error: label at end of compound statement 122 | case METRIC_TYPE_UNTYPED: | ^~~~~~~~~~~~~~~~~~~ ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed leak in format_stackdriver.c
error cases, other comments are cosmetic.
…h statement. This way the compiler can check that we handle all values in the `metric_type_t` enum.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved.
Note: This PR is a super-set of #4265, which should be merged first.
This change introduces a new metric type, called "FPCOUNTER". This is useful when the resolution provided by integers is not sufficient. A good example is the
system.cpu.time
metric, which should be measured in seconds. However, with a ten second interval, the counters of all states combined will only increase by ten, resulting in very poor resolution.One difference to integer counters is that floating point counters don't overflow. We therefore treat every situation in which the previous value is larger than the current value as a counter reset.
ChangeLog: Daemon: The new
FPCOUNTER
(floating point counter) metric type has been added.