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

Method initializeBlockCache

cachelib/navy/block_cache/BlockCache.cpp:1463–1477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1461}
1462
1463void BlockCache::initializeBlockCache() {
1464 // Allocator resets region manager
1465 allocator_.reset();
1466
1467 // Reset counters
1468 insertCount_.set(0);
1469 lookupCount_.set(0);
1470 removeCount_.set(0);
1471 allocErrorCount_.set(0);
1472 allocRetryCount_.set(0);
1473 logicalWrittenCount_.set(0);
1474 holeCount_.set(0);
1475 holeSizeTotal_.set(0);
1476 usedSizeBytes_.set(0);
1477}
1478
1479void BlockCache::getCounters(const CounterVisitor& visitor) const {
1480 visitor("navy_bc_size", getSize());

Callers

nothing calls this directly

Calls 2

resetMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected