This is an archive of the discontinued LLVM Phabricator instance.

[clangd] NFC: Add client-side logging for remote index requests
ClosedPublic

Authored by kbobyrev on Nov 26 2020, 7:47 AM.

Details

Summary

Figuring out whether the server is responding and debugging issues with remote
index setup is no easy task: add verbose logging for client side RPC requests
to relieve some pain.

Diff Detail

Event Timeline

kbobyrev created this revision.Nov 26 2020, 7:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 26 2020, 7:47 AM
kbobyrev requested review of this revision.Nov 26 2020, 7:47 AM
kbobyrev updated this revision to Diff 307869.Nov 26 2020, 7:49 AM

Switch Deadline type to const auto.

sammccall added inline comments.Dec 8 2020, 4:03 AM
clang-tools-extra/clangd/index/remote/Client.cpp
46–48

(we don't ussually use const for locals)

51

Including the request payload is IMO too much even at --log=verbose, we do this for LSP messages but those are more useful/central. Vlog the request and dlog the payload? (Similar to log/vlog for LSP)

75

"RPC Request" may be a bit jargony for these messages. And "Request" is part of the RequestT name.
It'd be nice to include the server name too, there may be several.

What about Remote index: LookupRequest => 123 results in 18ms. [llvm.clangd-index-staging.org:1234]?

kbobyrev updated this revision to Diff 310357.Dec 8 2020, 2:52 PM
kbobyrev marked 3 inline comments as done.

Address review comments.

This revision is now accepted and ready to land.Dec 9 2020, 5:17 AM
kbobyrev updated this revision to Diff 310614.Dec 9 2020, 12:35 PM

Rebase on top of master.

kbobyrev updated this revision to Diff 310616.Dec 9 2020, 12:39 PM

Change logging format to be consistent with another patch.

This revision was landed with ongoing or failed builds.Dec 9 2020, 12:40 PM
This revision was automatically updated to reflect the committed changes.