This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Export preamble AST and serialized size as metrics
ClosedPublic

Authored by sammccall on Apr 13 2022, 5:02 AM.

Diff Detail

Event Timeline

sammccall created this revision.Apr 13 2022, 5:02 AM
sammccall requested review of this revision.Apr 13 2022, 5:02 AM
adamcz added inline comments.Apr 13 2022, 5:21 AM
clang-tools-extra/clangd/Preamble.cpp
500

This is a significant change. You are now exporting this information for failed preamble builds. Do you think these are interesting? It might make the data a bit confusing (i.e. lots of small "built in <1s, did not read any files) when something is really wrong with preamble.

I think we should either only export on successful preamble OR add a boolean "success" dimension to the metric.

sammccall added inline comments.Apr 13 2022, 5:39 AM
clang-tools-extra/clangd/Preamble.cpp
500

This doesn't change what is exported, that's still controlled by TUScheduler in the same way (only exporting on success).

It just changes the behavior of this function: it now populates stats instead of leaving them uninitialized. The function already returns a success dimension (either the returned pointer is null or not).

adamcz accepted this revision.Apr 13 2022, 5:41 AM
This revision is now accepted and ready to land.Apr 13 2022, 5:41 AM