Lines Matching refs:sim_cache
70 void AssertCache(std::shared_ptr<Cache> sim_cache, in AssertCache() argument
76 EXPECT_EQ(expected_usage, sim_cache->GetUsage()); in AssertCache()
80 auto handle = sim_cache->Lookup(block); in AssertCache()
82 sim_cache->Release(handle); in AssertCache()
87 sim_cache->Lookup("0_" + ExtractUserKey(row_key).ToString()); in AssertCache()
89 sim_cache->Release(handle); in AssertCache()
113 std::shared_ptr<Cache> sim_cache = in TEST_F() local
118 new CacheSimulator(nullptr, sim_cache)); in TEST_F()
136 auto handle = sim_cache->Lookup(access.block_key); in TEST_F()
138 sim_cache->Release(handle); in TEST_F()
139 handle = sim_cache->Lookup(compaction_access.block_key); in TEST_F()
163 std::shared_ptr<Cache> sim_cache = in TEST_F() local
168 new PrioritizedCacheSimulator(nullptr, sim_cache)); in TEST_F()
174 auto handle = sim_cache->Lookup(access.block_key); in TEST_F()
176 sim_cache->Release(handle); in TEST_F()
213 std::shared_ptr<Cache> sim_cache = in TEST_F() local
219 nullptr, sim_cache, /*insert_blocks_row_kvpair_misses=*/true)); in TEST_F()
233 sim_cache->Lookup(std::to_string(first_get.sst_fd_number) + "_" + in TEST_F()
236 sim_cache->Release(handle); in TEST_F()
238 handle = sim_cache->Lookup(kBlockKeyPrefix + std::to_string(i)); in TEST_F()
240 sim_cache->Release(handle); in TEST_F()
259 sim_cache->Lookup(std::to_string(second_get.sst_fd_number) + "_" + in TEST_F()
262 sim_cache->Release(handle); in TEST_F()
264 handle = sim_cache->Lookup(kBlockKeyPrefix + std::to_string(i)); in TEST_F()
267 sim_cache->Release(handle); in TEST_F()
287 handle = sim_cache->Lookup(std::to_string(third_get.sst_fd_number) + "_" + in TEST_F()
292 handle = sim_cache->Lookup(kBlockKeyPrefix + std::to_string(i)); in TEST_F()
294 sim_cache->Release(handle); in TEST_F()
296 handle = sim_cache->Lookup(kBlockKeyPrefix + std::to_string(i)); in TEST_F()
322 std::shared_ptr<Cache> sim_cache = NewLRUCache(co); in TEST_F() local
325 nullptr, sim_cache, /*insert_blocks_row_kvpair_misses=*/true)); in TEST_F()
329 AssertCache(sim_cache, cache_simulator->miss_ratio_stats(), 1, 1, 1, {"1"}, in TEST_F()
335 AssertCache(sim_cache, cache_simulator->miss_ratio_stats(), 3, 2, 2, in TEST_F()
341 AssertCache(sim_cache, cache_simulator->miss_ratio_stats(), 4, 3, 3, in TEST_F()
350 AssertCache(sim_cache, cache_simulator->miss_ratio_stats(), 4, 4, 3, in TEST_F()
362 AssertCache(sim_cache, cache_simulator->miss_ratio_stats(), 5, 5, 3, in TEST_F()
373 AssertCache(sim_cache, cache_simulator->miss_ratio_stats(), 5, 6, 3, in TEST_F()
385 AssertCache(sim_cache, cache_simulator->miss_ratio_stats(), 5, 7, 3, in TEST_F()
395 AssertCache(sim_cache, cache_simulator->miss_ratio_stats(), 7, 8, 4, in TEST_F()
398 auto handle = sim_cache->Lookup("0_" + kRefKeyPrefix + key); in TEST_F()
400 sim_cache->Release(handle); in TEST_F()
418 AssertCache(sim_cache, cache_simulator->miss_ratio_stats(), 16, 103, 99, {}, in TEST_F()
421 auto handle = sim_cache->Lookup("0_" + kRefKeyPrefix + key); in TEST_F()
429 std::shared_ptr<Cache> sim_cache = in TEST_F() local
435 nullptr, sim_cache, /*insert_blocks_row_kvpair_misses=*/false)); in TEST_F()
442 sim_cache->Lookup(std::to_string(first_get.sst_fd_number) + "_" + in TEST_F()
445 sim_cache->Release(handle); in TEST_F()
449 handle = sim_cache->Lookup(kBlockKeyPrefix + std::to_string(i)); in TEST_F()