Skip to content

[sourcekitd-repl] 'time' requests #40249

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 1 commit into from
Nov 29, 2021
Merged

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Nov 19, 2021

When you prefix the request JSON with time, it will display the time taken for the request. e.g.

(SourceKit) time { key.request: source.request.compiler_version }
request time: 0.177 ms
{
  key.version_major: 5,
  key.version_minor: 6,
  key.version_patch: 0
}
(SourceKit)

@rintaro
Copy link
Member Author

rintaro commented Nov 19, 2021

@swift-ci Please smoke test

@rintaro rintaro requested a review from bnbarham November 19, 2021 00:06
Copy link
Contributor

@bnbarham bnbarham left a comment

Choose a reason for hiding this comment

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

Could use steady_clock instead, but otherwise LGTM. I did a quick grep of chrono and it seems we use all of system_clock, steady_clock, and high_resolution_clock 😆.

@rintaro rintaro force-pushed the sourcekid-repl-time branch from c45ce83 to 5ed027b Compare November 19, 2021 17:43
@rintaro
Copy link
Member Author

rintaro commented Nov 19, 2021

Thank you! I didn't know steady_clock 😅

@rintaro
Copy link
Member Author

rintaro commented Nov 19, 2021

@swift-ci Please smoke test

When you prefix the request JSON with 'time', it will display the time
taken for the request. e.g.

  (SourceKit) time { key.request: source.request.compiler_version }
  request time: 0.177 ms
  {
    key.version_major: 5,
    key.version_minor: 6,
    key.version_patch: 0
  }
  (SourceKit)
@rintaro rintaro force-pushed the sourcekid-repl-time branch from 5ed027b to 86158c6 Compare November 19, 2021 17:49
@rintaro
Copy link
Member Author

rintaro commented Nov 19, 2021

@swift-ci Please smoke test

@rintaro rintaro merged commit 5a006d2 into swiftlang:main Nov 29, 2021
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.

2 participants