Skip to content

profiler: increase timestamp precision #1689

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

Merged
merged 3 commits into from
Feb 28, 2023

Conversation

felixge
Copy link
Member

@felixge felixge commented Jan 25, 2023

(low priority)

What does this PR do?

Change event.json timestamp precision from seconds to nanoseconds.

Motivation

The current precision limitations were discovered while playing with prof-tester locally and seeing a profile that should have been 1s reported as 2s due to rounding effects caused by the limited precision.

There is probably no immediate benefit for improving the precision for normal 60s+ profiles.

Describe how to test/QA your changes

go test ./profiler

Reviewer's Checklist

  • If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
  • Changed code has unit tests for its functionality.
  • If this interacts with the agent in a new way, a system test has been added.

Sorry, something went wrong.

Change event.json timestamp precision from seconds to nanoseconds.

The current precision limitations were discovered while playing with
prof-tester locally and seeing a profile that should have been 1s
reported as 2s due to rounding effects caused by the limited precision.

There is probably no immediate benefit for improving the precision for
normal 60s+ profiles.
@felixge felixge added this to the v1.47.0 milestone Jan 25, 2023
@felixge felixge requested a review from a team as a code owner January 25, 2023 08:17
@pr-commenter
Copy link

pr-commenter bot commented Jan 25, 2023

Benchmarks

Comparing candidate commit 0f34cd4 in PR branch felix.geisendoerfer/profiler-timestamp-precision with baseline commit 5ff4c5c in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 6 cases.

@knusbaum knusbaum modified the milestones: v1.47.0, v1.48.0 Feb 1, 2023
@Hellzy Hellzy modified the milestones: v1.48.0, v1.49.0 Feb 27, 2023
@felixge felixge merged commit 0614a05 into main Feb 28, 2023
@felixge felixge deleted the felix.geisendoerfer/profiler-timestamp-precision branch February 28, 2023 11:35
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

Successfully merging this pull request may close these issues.

None yet

4 participants