Do not report ERROR when sample rate equals 100

This commit is contained in:
ZenoWang
2024-02-06 14:49:31 +00:00
committed by ob-robot
parent 1f1d5c08ae
commit c8ef409bf3
3710 changed files with 486984 additions and 3083329 deletions

View File

@ -180,11 +180,13 @@ TEST_F(TestAllocator, pm_basic)
// freelist
int large_size = INTACT_ACHUNK_SIZE - 200;
pm.set_max_chunk_cache_size(INTACT_ACHUNK_SIZE);
ptr = pm.alloc_page(large_size);
hold = pm.get_hold();
ASSERT_GT(hold, 0);
pm.free_page(ptr);
ASSERT_EQ(pm.get_hold(), hold);
pm.set_max_chunk_cache_size(0);
ptr = pm.alloc_page(large_size);
ASSERT_EQ(pm.get_hold(), hold);
pm.free_page(ptr);
@ -195,6 +197,7 @@ TEST_F(TestAllocator, pm_basic)
pm.free_page(ptr);
ASSERT_EQ(pm.get_hold(), hold);
pm.set_max_chunk_cache_size(INTACT_ACHUNK_SIZE * 2);
pm.alloc_page(large_size);
pm.alloc_page(large_size);
pm.alloc_page(large_size);