Skip to content
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

Apollo Tracing Support #352

Closed
michaelstaib opened this issue Nov 21, 2018 · 3 comments
Closed

Apollo Tracing Support #352

michaelstaib opened this issue Nov 21, 2018 · 3 comments
Assignees
Milestone

Comments

@michaelstaib
Copy link
Member

https://github.com/apollographql/apollo-tracing

@michaelstaib
Copy link
Member Author

private static long nanoTime() {
   long nano = 10000L * Stopwatch.GetTimestamp();
   nano /= TimeSpan.TicksPerMillisecond;
   nano *= 100L;
   return nano;
}

source

@rstaib
Copy link
Member

rstaib commented Jan 4, 2019

The nanoTime implementation above is dangerous, because it does not consider Stopwatch.Frequency which may differ not just from hardware/OS and uses instead 100L. The following implementation is technically correct.

private static long GetTimestampInNanoseconds()
{
    const long nanosecondsPerSecond = 1000000000;

    return Stopwatch.GetTimestamp() *
        (nanosecondsPerSecond / Stopwatch.Frequency);
}

@michaelstaib michaelstaib removed their assignment Jan 5, 2019
@michaelstaib michaelstaib pinned this issue Jan 5, 2019
rstaib added a commit that referenced this issue Jan 5, 2019
@rstaib
Copy link
Member

rstaib commented Jan 5, 2019

This issue depends on #459.

rstaib added a commit that referenced this issue Jan 6, 2019
rstaib added a commit that referenced this issue Jan 7, 2019
rstaib added a commit that referenced this issue Jan 7, 2019
rstaib added a commit that referenced this issue Jan 8, 2019
rstaib added a commit that referenced this issue Jan 8, 2019
rstaib added a commit that referenced this issue Jan 9, 2019
rstaib added a commit that referenced this issue Jan 9, 2019
rstaib added a commit that referenced this issue Jan 9, 2019
rstaib added a commit that referenced this issue Jan 9, 2019
rstaib added a commit that referenced this issue Jan 9, 2019
rstaib added a commit that referenced this issue Jan 9, 2019
@rstaib rstaib removed the in progress label Jan 9, 2019
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

No branches or pull requests

2 participants