Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Introduce Clock interface for time measurements #50

Merged
merged 3 commits into from
Sep 12, 2016
Merged

Conversation

yurishkuro
Copy link
Member

  • Use nano-time for measuring duration
  • Fix the tests, remove powermock dependency
  • add more tests for duration calculation

- Use nano-time for measuring duration
- Fix the tests, remove powermock dependency
@yurishkuro
Copy link
Member Author

@adriancole we discussed in the past how this lib used (millis*1000 + nanos/1000), I now changed it to be "more better".

}

@Override
public long currentTimeNanos() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd probably not use the word "Time" here, eventhough nanoTime does. maybe tick or nanoTick? https://google.github.io/guava/releases/19.0/api/docs/com/google/common/base/Ticker.html

Copy link
Contributor

Choose a reason for hiding this comment

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

reason is that people might be confused that it relates to the other "time" in this interface which it doesn't

@codefromthecrypt
Copy link
Contributor

naming bikeshed aside, looks good.

@@ -19,11 +19,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.uber.jaeger.filters.jaxrs2;
package com.uber.jaeger.context;
Copy link
Member Author

Choose a reason for hiding this comment

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

@oibe these tests weren't in the proper tests dir, so not sure if they were even exercised previously (intelliJ didn't understand them as tests)

Copy link
Contributor

Choose a reason for hiding this comment

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

Noted.

@oibe
Copy link
Contributor

oibe commented Sep 12, 2016

lgtm

@yurishkuro yurishkuro merged commit b93744a into master Sep 12, 2016
@yurishkuro yurishkuro deleted the introduce-clock branch December 23, 2017 21:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants