MCPcopy Create free account
hub / github.com/facebook/CacheLib / makeMap

Function makeMap

cachelib/benchmarks/HashMapBenchmark.cpp:84–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82
83template <class Map>
84Map makeMap(size_t& size) {
85 using K = typename Map::key_type;
86 size_t startBytes = getPageBytes();
87 Map m;
88 for (size_t i = 0; i < kKeySpace; ++i) {
89 ++m[makeKey<K>()];
90 }
91 size_t endBytes = getPageBytes();
92 size = endBytes > startBytes ? endBytes - startBytes : 0;
93 return m;
94}
95
96template <class Map>
97void mapLookupBench(size_t iters, const Map& map) {

Callers

nothing calls this directly

Calls 1

getPageBytesFunction · 0.85

Tested by

no test coverage detected