MCPcopy Create free account
hub / github.com/NetSys/bess / SetUp

Method SetUp

core/utils/cuckoo_map_bench.cc:65–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63 CuckooMapFixture() : cuckoo_(), stl_map_() {}
64
65 virtual void SetUp(benchmark::State &state) {
66 stl_map_ = new std::unordered_map<uint32_t, value_t>();
67 cuckoo_ = new CuckooMap<uint32_t, value_t>();
68
69 rng.SetSeed(0);
70
71 for (int i = 0; i < state.range(0); i++) {
72 uint32_t key = rng.Get();
73 value_t val = derive_val(key);
74
75 (*stl_map_)[key] = val;
76 cuckoo_->Insert(key, val);
77 }
78 }
79
80 virtual void TearDown(benchmark::State &) {
81 delete stl_map_;

Callers

nothing calls this directly

Calls 4

derive_valFunction · 0.85
SetSeedMethod · 0.80
GetMethod · 0.45
InsertMethod · 0.45

Tested by

no test coverage detected