[PATCH] D78429: [clangd] Metric tracking through Tracer

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 30 13:26:56 PDT 2020


kadircet added a comment.

In D78429#2012873 <https://reviews.llvm.org/D78429#2012873>, @sammccall wrote:

> Awesome, ship it!
>
> ... though, how do you feel about testing the actual metrics we export?
>
> Suggest a slightly generalized TestTracer that installs itself (RAII), and has a
>
>   // Returns recorded values for a metric, and clears then.
>   vector<double> TestTracer::take(StringRef Metric, StringRef Label="");
>
>
> Then it should be pretty simple to add assertions to a few existing tests.


Done, except tweak related metrics. We are not testing them through clangdserver, and i shied away from doing the plumbing :/ Let me know if you think it is important.

Also while writing the test for rename I've noticed we were actually counting renamed files rather than occurrences, had to put a loop that would go over each file, PTAL.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78429/new/

https://reviews.llvm.org/D78429





More information about the cfe-commits mailing list