-
Notifications
You must be signed in to change notification settings - Fork 0
Rename seconds to TTL and use std::chrono #8
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
Conversation
Pull Request Test Coverage Report for Build 2063488925
💛 - Coveralls |
34e469b to
7cebf7d
Compare
|
I will be needing the chrono stuff as well for PR I am currently working on where I need to feed in external time to the summary metric type. |
6837162 to
dd539fd
Compare
07a5a53 to
9ba4fa8
Compare
d13138c to
100efce
Compare
silverjam
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This look even better for an upstream PR submission, in general we should make reasonable effort to get things upstream so that our forks are as minimal as possible
b389800 to
3fc5e1a
Compare
|
@silverjam yep I think this should be good for upstream. I think replacing steady clock with system clock might be controversial but that was the only way I could then pass in time stamps from recorded data in for replay. I did try to think if there was a way to do make it flexible with templates but ended up a bit of a mess. |
Hrmm, OK, maybe we could upstream everything except that change then? |
|
Yeah I think that would make sense. I feel like us replaying data is probably a bit of a corner case for this library... |
a63c4f5 to
b9df5b8
Compare
This PR is set to merge on the rebased master, but I will update that once #7 is merged.
I found the use of
Seconds()confusing for the metric expiry time, so I renamed itTTL().I also updated the expiry code use use
std::chronoas that is already used in theSummaryclass, and makes the TTL units clearer.Finally I added a bunch of test cases to check that the expiry stuff is working correctly.