[clangd] Dont include version string in update tasks
authorKadir Cetinkaya <kadircet@google.com>
Tue, 19 Apr 2022 16:21:03 +0000 (18:21 +0200)
committerKadir Cetinkaya <kadircet@google.com>
Tue, 19 Apr 2022 17:27:04 +0000 (19:27 +0200)
This increases cardinality of span latency metrics. Currently this was
being shown to the user via file status updates as `Running Update (x)` after
this change we'll only display `Running Update`. This also affects logs in case
of a crash, but contents and version number for inputs are printed separately in
that case already.

Differential Revision: https://reviews.llvm.org/D124013

clang-tools-extra/clangd/TUScheduler.cpp

index 7c5a52f6ea443bd691045603069d2f8aa4ec48b2..19d4ca5a48a507840a0de5986762c6b2ec3acbfa 100644 (file)
@@ -798,7 +798,7 @@ ASTWorker::~ASTWorker() {
 
 void ASTWorker::update(ParseInputs Inputs, WantDiagnostics WantDiags,
                        bool ContentChanged) {
-  std::string TaskName = llvm::formatv("Update ({0})", Inputs.Version);
+  llvm::StringLiteral TaskName = "Update";
   auto Task = [=]() mutable {
     // Get the actual command as `Inputs` does not have a command.
     // FIXME: some build systems like Bazel will take time to preparing