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

[Tally Snapshot] -- add some functionality to histogram snapshot so t… #220

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AlPal8
Copy link

@AlPal8 AlPal8 commented May 23, 2023

…hat it is easier to test.

Add the number of values and durations in order to enable easier histogram testing

…hat it is easier to test.

Add the number of values and durations as well as which buckets have values to enable easier histogram testing
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@@ -660,6 +660,12 @@ type HistogramSnapshot interface {

// Durations returns the sample values by upper bound for a durationHistogram
Durations() map[time.Duration]int64

// NumValues returns the number of values which were emitted by this metric
NumValues() int64
Copy link
Collaborator

Choose a reason for hiding this comment

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

The problem with doing this is HistogramSnapshot is an interface... i.e. adding a method to an interface is a breaking version change.

This is one of the things about our current Tally API - we expose everything via interfaces, which is a right PITA. We can't land this like this.

We can make a better testing story in the current version tho. Lets chat offline once

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.

None yet

3 participants