This repository was archived by the owner on May 30, 2024. It is now read-only.
Closed
Conversation
This was referenced Apr 21, 2023
bitwise-aiden
approved these changes
Apr 24, 2023
| Perf.mark(`${type}.end`); | ||
|
|
||
| // Insert benchmarked response time into telemetry data | ||
| const bench = Perf.measure( |
Contributor
There was a problem hiding this comment.
Just to check here, can there be a case where there are multiple {type}.start being performed at once? Would this benefit from an additional unique identifier to ensure that they don't collide?
Member
Author
There was a problem hiding this comment.
Oh, that's a great catch. If for any reason the server gets backlogged, we may indeed end up creating another start mark for the same request type.
e4a8b86 to
cdd9d6b
Compare
Contributor
|
Moving to backlog as discussed at team meeting on 2023-06-12. |
Contributor
|
This pull request is being marked as stale because there was no activity in the last 2 months |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Closes Shopify/ruby-lsp#1498
Related to Shopify/ruby-lsp#650.
Use the new general middleware to benchmark requests and report telemetry entirely from the client side. This allows us to remove telemetry events from the server and cut the amount of IO it does in half.
Implementation
Added the new middleware and used
perf_hooksto measure the performance of executing the requests. If a request fails, the server returns extra information about the errors in the response which we use to report.Added a function to recursively sanitize URIs that are inside parameters so that it doesn't include the
HOMEpart of the directory.Added a function to figure out the version of the
ruby-lspgem.I'd love to get some feedback on these three points. I'm especially not crazy about how we're figuring out the server version.
Note: we may want to hold back until there's a stable release of the languageclient package.
Manual Tests