[PATCH] D106796: [clangd] Record remote index usage
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 26 08:13:04 PDT 2021
kadircet created this revision.
kadircet added a reviewer: sammccall.
Herald added subscribers: usaxena95, arphaman.
kadircet requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang-tools-extra.
This is a gauage metric that sets particular remote-index instances as
used. It should enable accumulation of multiple streams to see number of clangd
processes making use of remote index, broken down by remote index address.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D106796
Files:
clang-tools-extra/clangd/tool/ClangdMain.cpp
Index: clang-tools-extra/clangd/tool/ClangdMain.cpp
===================================================================
--- clang-tools-extra/clangd/tool/ClangdMain.cpp
+++ clang-tools-extra/clangd/tool/ClangdMain.cpp
@@ -561,10 +561,13 @@
std::unique_ptr<SymbolIndex>
loadExternalIndex(const Config::ExternalIndexSpec &External,
AsyncTaskRunner *Tasks) {
+ static const trace::Metric RemoteIndexUsed("used_remote_index",
+ trace::Metric::Value, "address");
switch (External.Kind) {
case Config::ExternalIndexSpec::None:
break;
case Config::ExternalIndexSpec::Server:
+ RemoteIndexUsed.record(1, External.Location);
log("Associating {0} with remote index at {1}.", External.MountPoint,
External.Location);
return remote::getClient(External.Location, External.MountPoint);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106796.361670.patch
Type: text/x-patch
Size: 874 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210726/8199db2a/attachment.bin>
More information about the cfe-commits
mailing list