[PATCH] D94393: [clangd] Add metrics for go-to-implementation.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 11 00:58:37 PST 2021
hokein created this revision.
hokein added a reviewer: usaxena95.
Herald added subscribers: kadircet, arphaman.
hokein requested review of this revision.
Herald added subscribers: MaskRay, ilya-biryukov.
Herald added a project: clang.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D94393
Files:
clang-tools-extra/clangd/XRefs.cpp
Index: clang-tools-extra/clangd/XRefs.cpp
===================================================================
--- clang-tools-extra/clangd/XRefs.cpp
+++ clang-tools-extra/clangd/XRefs.cpp
@@ -298,6 +298,17 @@
llvm::StringRef MainFilePath) {
if (IDs.empty())
return {};
+ static constexpr trace::Metric FindImplementorsMetric(
+ "find_implementors", trace::Metric::Counter, "case");
+ switch (Predicate) {
+ case RelationKind::BaseOf:
+ FindImplementorsMetric.record(1, "find-base");
+ break;
+ case RelationKind::OverriddenBy:
+ FindImplementorsMetric.record(1, "find-override");
+ break;
+ }
+
RelationsRequest Req;
Req.Predicate = Predicate;
Req.Subjects = std::move(IDs);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94393.315722.patch
Type: text/x-patch
Size: 759 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210111/5065ae7c/attachment.bin>
More information about the cfe-commits
mailing list