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

Function TEST_F

cachelib/allocator/tests/NvmCacheStateTest.cpp:53–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51};
52
53TEST_F(NvmCacheStateTest, FreshStart) {
54 auto dir = getCacheDir();
55 NvmCacheState s(util::getCurrentTimeSec(), dir, false /* encryption */,
56 false /* truncateAllocSize */);
57
58 // directory is empty at this point
59 ASSERT_FALSE(s.shouldDropNvmCache());
60 ASSERT_FALSE(s.wasCleanShutDown());
61}
62
63TEST_F(NvmCacheStateTest, ClearState) {
64 auto dir = getCacheDir();

Callers

nothing calls this directly

Calls 10

getCurrentTimeSecFunction · 0.85
getStatIfExistsFunction · 0.85
shouldDropNvmCacheMethod · 0.80
wasCleanShutDownMethod · 0.80
markSafeShutDownMethod · 0.80
clearPrevStateMethod · 0.80
markTruncatedMethod · 0.80
getCreationTimeMethod · 0.45
writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected