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

Increase reported profile timestamp precision #31

Merged
merged 1 commit into from
Mar 9, 2022

Conversation

ivoanjo
Copy link
Member

@ivoanjo ivoanjo commented Feb 25, 2022

What does this PR do?

Increase the reported start / end timestamp precision from seconds to nanoseconds.

Motivation

Currently, Java uses microsecond precision for uploaded profile start/end, whereas Ruby, Python, Go and libddprof use second precision.

While discussing with @flodav he made a good point that just truncating the start and end would mean that we could induce quite a bit of error.

I decided to bump it to nanos, since we have it anyway. Open to change, if it's overkill :)

How to test the change?

Confirm that the increased precision is visible in a libddprof request. (I tested it locally with the Ruby profiler).

Currently, Java uses microsecond precision for uploaded profile
start/end, whereas Ruby, Python, Go and libddprof use second precision.

While discussing with @flodav he made a good point that just truncating
the start and end would mean that we could induce quite a bit of error.

I decided to bump it to nanos, since we have it anyway. Open to
change, if it's overkill :)
Copy link
Contributor

@r1viollet r1viollet left a comment

Choose a reason for hiding this comment

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

Yay ! Thank you

@ivoanjo ivoanjo merged commit 1970a0e into main Mar 9, 2022
@ivoanjo ivoanjo deleted the ivoanjo/increase-reported-timestamp-precision branch March 9, 2022 10:43
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.

2 participants