This revision was automatically updated to reflect the committed changes.
Closed by commit rL345150: [clangd] When replying, log the method name and
latency. (authored by sammccall, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D53647
sammccall marked an inline comment as done.
sammccall added inline comments.
Comment at: clangd/ClangdLSPServer.cpp:221
(*TraceArgs)["Reply"] = *Reply;
-else {
- auto Err = Reply.takeError();
+Server->Transp.reply(std::move(ID), std::move(Reply
kadircet added a comment.
LG, thanks!
Comment at: clangd/ClangdLSPServer.cpp:218
+log("--> reply:{0}({1}) {2:ms}", Method, ID, Duration);
+std::lock_guard Lock(Server->TranspWriter);
+if (TraceArgs)
Move locking below to not lock while c
sammccall added a comment.
Log now looks something like this:
I[16:47:01.225] <-- textDocument/completion("2")
I[16:47:01.233] Ignored diagnostic.
/usr/local/google/home/sammccall/temp/test.cc:7:1:'main' must return 'int'
I[16:47:01.234] Code complete: sema context Statement, query scopes
sammccall created this revision.
sammccall added a reviewer: kadircet.
Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric,
ilya-biryukov.
This information is strictly available in the log (you can find the original
call) but it makes the log easier to follow in practice.