MCPcopy Create free account
hub / github.com/apple/foundationdb / populate

Function populate

flowbench/BenchIterate.cpp:30–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28#include "flowbench/GlobalData.h"
29
30void populate(Standalone<VectorRef<MutationRef>>& mutations, size_t items, size_t size, KeyRef key, ValueRef value) {
31 mutations = Standalone<VectorRef<MutationRef>>{};
32 mutations.reserve(mutations.arena(), items);
33 for (int i = 0; i < items; ++i) {
34 mutations.emplace_back_deep(mutations.arena(), MutationRef::Type::SetValue, key, value);
35 }
36}
37
38void populate(MutationList& mutations, size_t items, size_t size, KeyRef key, ValueRef value) {
39 mutations = MutationList{};

Callers 3

bench_iterateFunction · 0.70
populateMethod · 0.50
visitor_tMethod · 0.50

Calls 3

MutationRefClass · 0.85
reserveMethod · 0.45
push_back_deepMethod · 0.45

Tested by

no test coverage detected