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

Don't report empty histograms to FastForward #140

Merged
merged 1 commit into from
Jun 5, 2023

Conversation

spkrka
Copy link
Member

@spkrka spkrka commented Jun 5, 2023

Rationale

If histograms don't have any reported values, or have not been used
in a long time, the snapshot is empty and the histogram metrics
will not have a reasonable default value. All stats (min, max, median, etc) would
incorrectly be reported as zero

Performance impact

The performance impact should be minimal, since it only adds one additional
if-check when reporting histograms. Snapshot.size() is a fast method, simply
returning the length of its internal array.

For cases where snapshots are empty - i.e. unused histograms we should see
a performance improvement since we can skip emitting the data points to FastForward
as well as skipping the creation of the metric ids.

@spkrka spkrka force-pushed the krka/empty-histograms branch 2 times, most recently from a90084d to 411f5eb Compare June 5, 2023 06:57
*Rationale*

If histograms don't have any reported values, or have not been used
in a long time, the snapshot is empty and the histogram metrics
will not have a reasonable default value. All stats (min, max, median, etc) would
incorrectly be reported as zero

*Performance impact*

The performance impact should be minimal, since it only adds one additional
if-check when reporting histograms. Snapshot.size() is a fast method, simply
returning the length of its internal array.

For cases where snapshots are empty - i.e. unused histograms we should see
a performance improvement since we can skip emitting the data points to FastForward
as well as skipping the creation of the metric ids.
@roadr roadr merged commit 15ead80 into spotify:master Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants