10000 IDE: Operation-specific metrics and small improvements by jvilk-stripe · Pull Request #2500 · sorbet/sorbet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

IDE: Operation-specific metrics and small improvements #2500

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 5 commits into from
Jan 17, 2020

Conversation

jvilk-stripe
Copy link
Collaborator

IDE: Operation-specific metrics and small improvements

Specific changes:

  • LSPMessages now have a second optional timer that tracks the latency of specific methods.
  • LSPMessage now contains message (and timer) cancelation logic.
  • enableMultithreading is now a property of LSPTask rather than a parameter to TypecheckerCoordinator::syncRun.
  • Renamed the confusing TypecheckerTask::hasDedicatedThread to TypecheckerTask::collectCounters.

Motivation

We have no way to check the latency of specific operations in SignalFX, as all operations are grouped together

Test plan

See included automated tests.

@jvilk-stripe jvilk-stripe requested review from a team and mkillianey-stripe and removed request for a team January 16, 2020 20:03
@jvilk-stripe jvilk-stripe added the IDE Relating to Sorbet's LSP server or VS Code extension label Jan 16, 2020
Copy link
Contributor
@mkillianey-stripe mkillianey-stripe left a comment

Choose a reason for hiding this comment

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

LGTM!

8000
void LSPMessage::cancel() {
if (!canceled) {
canceled = true;
// Protect against nullptrs.
Copy link
Contributor

Choose a reason for hiding this comment

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

Personal preference nit: although I'm generally in favor of more comments, this specific one didn't give me any extra information that wasn't clear to me from the code. (I see that this code moved, and the original had this comment, so just giving you the liberty to remove if you found it equally tame.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, I can add context: A Timer may not be specified (it's optional).

@jvilk-stripe jvilk-stripe requested a review from a team as a code owner January 17, 2020 22:07
@jvilk-stripe jvilk-stripe requested review from DarkDimius and removed request for a team and DarkDimius January 17, 2020 22:07
@jvilk-stripe
Copy link
Collaborator Author
jvilk-stripe commented Jan 17, 2020

why is this requesting extra reviews? sorry about that

@jez
Copy link
Collaborator
jez commented Jan 17, 2020

I think dmitry changed some things.

@jvilk-stripe jvilk-stripe merged commit 2a16bc6 into master Jan 17, 2020
@jvilk-stripe jvilk-stripe deleted the jvilk/small-fixes branch January 17, 2020 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IDE Relating to Sorbet's LSP server or VS Code extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0