Skip to content

make Time interface and the constructor which accepts it public, so that users can plug in time #1

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

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

Conversation

katzseth22202
Copy link

The numerus percentile class produces 0 until the first bucket time has elapsed. This can make writing unit tests tricky. Most unit testable libraries will have a TestClock that is used for getting the time, that can be updated for the unit test.

Making the Time interface public and the corresponding constructor will allow NumerusRollingPercentile to participate in unit tests without waiting for the bucket to elapse, provided someone has given a pluggable time implementation to the constructor.

@katzseth22202
Copy link
Author

Any update on merging this?

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.

1 participant