[PATCH] D53647: [clangd] When replying, log the method name and latency.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 24 08:18:54 PDT 2018


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));
+      } else {
----------------
kadircet wrote:
> What about also printing vlog after sending out reply? Because for "heavy" replies there is a huge difference between process time and serialization of response to json, sometimes it might help to see how much time is spent for serialization as well.(for example ycmd patch, it takes a few hundred ms to prepare reply, but then a few seconds to dump it)
As discussed offline, this is interesting, but only relevant for really huge responses and probably noise the rest of the time.
Let's leave it out for now, but may be worth adding locally when debugging this.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D53647





More information about the cfe-commits mailing list