[PATCH] D88590: [clangd] Add bencmark for measuring latency of DecisionForest model.
Adam Czachorowski via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 1 09:03:00 PDT 2020
adamcz added a comment.
Would it make sense to set random seed to something fixed to make this more reproducible?
================
Comment at: clang-tools-extra/clangd/benchmarks/CompletionModel/DecisionForestBenchmark.cpp:2
+//===--- DecisionForestBenchmark.cpp - Benchmark for code completion ranking
+// latency -----------*- C++ -*-===//
+//
----------------
nit: this is supposed to be one-line comment, I think.
================
Comment at: clang-tools-extra/clangd/benchmarks/CompletionModel/DecisionForestBenchmark.cpp:22
+namespace {
+std::vector<Example> GenerateRandomDataset(int NumExamples) {
+ auto FlipCoin = [&](float Probability) {
----------------
There are few lint warnings in this file. Please address them.
================
Comment at: clang-tools-extra/clangd/benchmarks/CompletionModel/DecisionForestBenchmark.cpp:73
+ for (auto _ : State) {
+ // State.PauseTiming();
+ const std::vector<Example> Examples = GenerateRandomDataset(1000000);
----------------
These should not be comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88590/new/
https://reviews.llvm.org/D88590
More information about the cfe-commits
mailing list