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

Method size

src/db.cpp:3091–3098  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3089}
3090
3091size_t redisDbPersistentData::size(bool fCachedOnly) const
3092{
3093 if (m_spstorage != nullptr && !m_fAllChanged && !fCachedOnly)
3094 return m_spstorage->count() + m_cnewKeysPending;
3095
3096 return dictSize(m_pdict)
3097 + (m_pdbSnapshot ? (m_pdbSnapshot->size(fCachedOnly) - dictSize(m_pdictTombstone)) : 0);
3098}
3099
3100bool redisDbPersistentData::removeCachedValue(const char *key, dictEntry **ppde)
3101{

Callers 15

dbRandomKeyFunction · 0.45
emptyDbStructureFunction · 0.45
dbTotalServerKeyCountFunction · 0.45
dbsizeCommandFunction · 0.45
removeSubkeyExpireMethod · 0.45
processChangesAsyncMethod · 0.45
randomMethod · 0.45
serializeExpireFunction · 0.45
dictRehashAsyncStartFunction · 0.45
dictRehashAsyncFunction · 0.45
dictRehashSomeAsyncFunction · 0.45

Calls 1

countMethod · 0.45

Tested by 5

retrieveMethod · 0.36
clearMethod · 0.36
enumerateMethod · 0.36
enumerate_hashslotMethod · 0.36
countMethod · 0.36