Skip to content

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.

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.

3 participants