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

Function TEST

be/src/runtime/mem-tracker-test.cc:29–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27namespace impala {
28
29TEST(MemTestTest, SingleTrackerNoLimit) {
30 MemTracker t;
31 EXPECT_FALSE(t.has_limit());
32 t.Consume(10);
33 EXPECT_EQ(t.consumption(), 10);
34 t.Consume(10);
35 EXPECT_EQ(t.consumption(), 20);
36 t.Release(15);
37 EXPECT_EQ(t.consumption(), 5);
38 EXPECT_FALSE(t.LimitExceeded(MemLimit::HARD));
39 // Clean up.
40 t.Release(5);
41}
42
43TEST(MemTestTest, SingleTrackerWithLimit) {
44 MemTracker t(11);

Callers

nothing calls this directly

Calls 15

bindFunction · 0.85
soft_limitMethod · 0.80
GetLimitMethod · 0.80
GetLowestLimitMethod · 0.80
TransferToMethod · 0.80
AddGcFunctionMethod · 0.80
push_backMethod · 0.80
has_limitMethod · 0.45
ConsumeMethod · 0.45
consumptionMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected