MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / getPrefix

Function getPrefix

src/storage/rocksdb.cpp:27–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27std::string getPrefix(unsigned int hashslot)
28{
29 HASHSLOT_PREFIX_TYPE slot = HASHSLOT_PREFIX_ENDIAN((HASHSLOT_PREFIX_TYPE)hashslot);
30 char *hash_char = (char *)&slot;
31 return std::string(hash_char, HASHSLOT_PREFIX_BYTES);
32}
33
34std::string prefixKey(const char *key, size_t cchKey)
35{

Callers 3

prefixKeyFunction · 0.85
enumerate_hashslotMethod · 0.85
randomHashSlotFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected