MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST

Function TEST

tensorflow/core/platform/cloud/ram_file_block_cache_test.cc:40–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40TEST(RamFileBlockCacheTest, IsCacheEnabled) {
41 auto fetcher = [](const string& filename, size_t offset, size_t n,
42 char* buffer, size_t* bytes_transferred) {
43 // Do nothing.
44 return Status::OK();
45 };
46 RamFileBlockCache cache1(0, 0, 0, fetcher);
47 RamFileBlockCache cache2(16, 0, 0, fetcher);
48 RamFileBlockCache cache3(0, 32, 0, fetcher);
49 RamFileBlockCache cache4(16, 32, 0, fetcher);
50
51 EXPECT_FALSE(cache1.IsCacheEnabled());
52 EXPECT_FALSE(cache2.IsCacheEnabled());
53 EXPECT_FALSE(cache3.IsCacheEnabled());
54 EXPECT_TRUE(cache4.IsCacheEnabled());
55}
56
57TEST(RamFileBlockCacheTest, ValidateAndUpdateFileSignature) {
58 int calls = 0;

Callers

nothing calls this directly

Calls 15

ReadCacheFunction · 0.85
DefaultFunction · 0.85
FailedPreconditionFunction · 0.85
IsCacheEnabledMethod · 0.80
SetNowSecondsMethod · 0.80
RemoveFileMethod · 0.80
WaitForMethod · 0.80
push_backMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected