[
https://issues.apache.org/jira/browse/HTRACE-376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15334321#comment-15334321
]
Colin Patrick McCabe commented on HTRACE-376:
---------------------------------------------
Thanks for looking at this.
{code}
+ begin(System.currentTimeMillis(),System.nanoTime()).
{code}
If you read the documentation of {{System#nanoTime}} here
http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/System.html#nanoTime() ,
it says that "This method can only be used to measure elapsed time and is not
related to any other notion of system or wall-clock time." Since HTrace uses
wall-clock time in its span times, nanotime is not suitable for us. We also do
not want to be fetching the time twice each time we create a span. There is a
cost associated with this. Once is enough.
{code}
- public Builder begin(long begin) {
+ public Builder begin(long begin, long beginNano) {
{code}
{{MilliSpan#Builder#begin}} is a public function which is part of the API. It
can't be changed in the htrace 4.x line. You will need to add a new function
to preserve backwards compatibility.
We also need to add the nanoTimes to the Span JSON, both on the JSON parsing
and JSON emitting side.
> HTrace should support nanosecond time granularities
> ---------------------------------------------------
>
> Key: HTRACE-376
> URL: https://issues.apache.org/jira/browse/HTRACE-376
> Project: HTrace
> Issue Type: Improvement
> Components: core
> Affects Versions: 3.1.0
> Reporter: Colin Patrick McCabe
> Assignee: Pranavan
> Attachments: HTRACE-376.001.patch
>
>
> HTrace should support nanosecond time granularities. Currently only a
> granularity of milliseconds is supported.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)