This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Add benchmark for measuring latency of DecisionForest model.
ClosedPublic

Authored by usaxena95 on Sep 30 2020, 9:56 AM.

Diff Detail

Event Timeline

usaxena95 created this revision.Sep 30 2020, 9:56 AM
usaxena95 requested review of this revision.Sep 30 2020, 9:56 AM

Minor fixes.

usaxena95 updated this revision to Diff 295478.Oct 1 2020, 12:51 AM

Added benchmark.

usaxena95 updated this revision to Diff 295479.Oct 1 2020, 12:58 AM

Distribution change and better formatting.

adamcz added a comment.Oct 1 2020, 9:02 AM

Would it make sense to set random seed to something fixed to make this more reproducible?

clang-tools-extra/clangd/benchmarks/CompletionModel/DecisionForestBenchmark.cpp
3

nit: this is supposed to be one-line comment, I think.

23

There are few lint warnings in this file. Please address them.

74

These should not be comments.

adamcz added a comment.Oct 1 2020, 9:21 AM

Also typo in commit description: bencmark

usaxena95 retitled this revision from [clangd] Add bencmark for measuring latency of DecisionForest model. to [clangd] Add benchmark for measuring latency of DecisionForest model..Oct 2 2020, 4:43 AM
usaxena95 updated this revision to Diff 295796.Oct 2 2020, 4:51 AM
usaxena95 marked 3 inline comments as done.

Addressed comments: Default seeded the RNG for the benchmark.

usaxena95 updated this revision to Diff 295797.Oct 2 2020, 4:53 AM

Added newline at end of files.

adamcz accepted this revision.Oct 2 2020, 7:01 AM

Still a couple of lint warnings, otherwise LGTM

clang-tools-extra/clangd/benchmarks/CompletionModel/DecisionForestBenchmark.cpp
74

Move this out of the loop. Right now we re-generate "random" dataset, but it's always the same dataset ;-)

This revision is now accepted and ready to land.Oct 2 2020, 7:01 AM
usaxena95 updated this revision to Diff 295837.Oct 2 2020, 8:41 AM
usaxena95 marked an inline comment as done.

Addressed comments.

clang-tools-extra/clangd/benchmarks/CompletionModel/DecisionForestBenchmark.cpp
74

I added it inside the loop since there is only one state right now. But probably moving it out makes it more meaningful.