Apply suggestions from code review

Co-authored-by: Kostas Kyrimis  <kostaskyrim@gmail.com>
This commit is contained in:
Jure Bajic 2022-12-05 15:50:40 +01:00 committed by GitHub
parent 75b598d014
commit 9bab26fb10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ static void BM_BenchmarkRemoveSkipList(::benchmark::State &state) {
utils::SkipList<storage::v3::PrimaryKey> skip_list;
PrepareData(skip_list, state.range(0));
// So we can also have elements that does don't exist
// So we can also have elements that don't exist
std::mt19937 i_generator(std::random_device{}());
std::uniform_int_distribution<int64_t> i_distribution(0, state.range(0) * 2);
int64_t removed_elems{0};

View File

@ -99,7 +99,7 @@ inline void RunTest(std::function<void(const std::atomic<bool> &, Stats &)> test
std::cout << " Successful find: " << stats.succ[3] << std::endl;
std::cout << std::endl;
const auto tot = stats.succ[0] + stats.succ[1] + stats.succ[2] + stats.succ[3];
const auto tot = std::accumulate(stats.succ.begin(), + stats.succ.begin() + 3, 0);
const auto tops = stats.total;
std::cout << "Total successful: " << tot << " (" << tot / FLAGS_duration << " calls/s)" << std::endl;