Skip to content
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

Merged
merged 20 commits into from
Feb 2, 2024

Conversation

octo
Copy link
Member

@octo octo commented Jan 31, 2024

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.

@octo octo requested review from a team as code owners January 31, 2024 09:25
@collectd-bot collectd-bot added this to the 6.0 milestone Jan 31, 2024
@octo octo force-pushed the 6/fpcounter branch 2 times, most recently from 9b5ded8 to 355f01b Compare January 31, 2024 09:57
Copy link
Contributor

@eero-t eero-t left a 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.

src/daemon/metric.h Outdated Show resolved Hide resolved
src/daemon/plugin.h Outdated Show resolved Hide resolved
Copy link
Contributor

@eero-t eero-t left a 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.

src/daemon/utils_cache.c Outdated Show resolved Hide resolved
src/utils/format_open_telemetry/format_open_telemetry.cc Outdated Show resolved Hide resolved
src/utils/value_list/value_list.h Outdated Show resolved Hide resolved
Copy link
Contributor

@eero-t eero-t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

@octo octo merged commit f009fac into collectd:collectd-6.0 Feb 2, 2024
27 checks passed
collectd 6 automation moved this from In progress to Done Feb 2, 2024
@octo octo deleted the 6/fpcounter branch February 2, 2024 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
collectd 6
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants