MCPcopy Create free account
hub / github.com/apache/impala / TEST_P

Function TEST_P

be/src/util/cache/cache-test.cc:90–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88 ShardingPolicy::SingleShard)));
89
90TEST_P(CacheTest, TrackMemory) {
91 if (mem_tracker_) {
92 Insert(100, 100, 1);
93 ASSERT_EQ(1, mem_tracker_->consumption());
94 UpdateCharge(100, 2);
95 ASSERT_EQ(2, mem_tracker_->consumption());
96 Erase(100);
97 ASSERT_EQ(0, mem_tracker_->consumption());
98 ASSERT_EQ(2, mem_tracker_->peak_consumption());
99 }
100}
101
102TEST_P(CacheTest, HitAndMiss) {
103 ASSERT_EQ(-1, Lookup(100));

Callers

nothing calls this directly

Calls 11

InsertClass · 0.85
MaxChargeMethod · 0.80
EncodeIntFunction · 0.70
DecodeIntFunction · 0.70
resetMethod · 0.65
consumptionMethod · 0.45
peak_consumptionMethod · 0.45
sizeMethod · 0.45
LookupMethod · 0.45
ValueMethod · 0.45
UpdateChargeMethod · 0.45

Tested by

no test coverage detected