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

Reimplement request/response timing - improves accuracy and correctness #1161

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

wendigo
Copy link
Collaborator

@wendigo wendigo commented May 9, 2024

  • Increase metrics precision to nanoseconds (and use correct way of measuring elapsed times - using monotonic time source rather than a system time that could go backwards)
  • Drop TimingFilter and capture metrics on the Jetty level
  • Validate timings invariants

Fixes:

  • Metrics capture for async responses

@wendigo wendigo requested a review from electrum May 9, 2024 20:28
@wendigo
Copy link
Collaborator Author

wendigo commented May 9, 2024

I know that this PR is pretty big but it drops a lot of unnecessary code and aligns the code for better readability. It's best to review it with the checked out code to see how it looks like after changes.

@wendigo wendigo force-pushed the serafin/revamp-timings branch 2 times, most recently from 44a4cad to 7a2a4d1 Compare May 9, 2024 20:44
@wendigo
Copy link
Collaborator Author

wendigo commented May 10, 2024

Alternative to #1160

@wendigo wendigo force-pushed the serafin/revamp-timings branch 3 times, most recently from da5bd54 to c59d3fe Compare May 10, 2024 14:43
@wendigo
Copy link
Collaborator Author

wendigo commented May 15, 2024

@electrum PTAL. Currenty these timings are broken for async responses.

- Increase metrics precision to nanoseconds using monotonically increasing time source
- Drop TimingFilter and capture metrics on the Jetty level alone
- Validate timings invariants for correctness
- Fix metrics capture when async servlet API is used
@wendigo wendigo changed the title Revamp request timings Reimplement request/response timing - improves accuracy and correctness Jun 5, 2024
@wendigo
Copy link
Collaborator Author

wendigo commented Jun 5, 2024

@electrum PTAL. Right now this doesn't work for async servlet at all. I've tested it thoroughly and added invariants that check that corresponding processing stages happen monotonically. In HTTP/2 where requests are really fast (us/ms) this matters for accuracy:

Screenshot 2024-06-05 at 16 44 40

@electrum electrum merged commit 73f82cc into airlift:master Jun 5, 2024
3 checks passed
@wendigo wendigo self-assigned this Jun 5, 2024
@wendigo wendigo deleted the serafin/revamp-timings branch June 6, 2024 09: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

2 participants