mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-16 09:56:22 +03:00
added stats
This commit is contained in:
parent
c0e2a93e4d
commit
52e72a04a1
5 changed files with 109 additions and 3 deletions
|
|
@ -178,6 +178,9 @@ TEST_BEGIN(test_hpa_sec) {
|
|||
expect_zu_eq(hpa_stats.psset_stats.merged.nactive, target_nallocs, "");
|
||||
expect_zu_eq(hpa_stats.secstats.bytes, (target_nallocs - 1) * PAGE,
|
||||
"sec should have extra pages");
|
||||
expect_zu_eq(
|
||||
hpa_stats.nonderived_stats.alloc_batch_nallocs[target_nallocs], 1,
|
||||
"");
|
||||
|
||||
/* Alloc/dealloc NALLOCS times and confirm extents are in sec. */
|
||||
edata_t *edatas[NALLOCS];
|
||||
|
|
@ -193,6 +196,11 @@ TEST_BEGIN(test_hpa_sec) {
|
|||
hpa_stats.psset_stats.merged.nactive, expected_nactive, "");
|
||||
expect_zu_eq(hpa_stats.secstats.bytes, (target_nallocs - 1) * PAGE,
|
||||
"multiple refills (every target_nallocs allocations)");
|
||||
const size_t expected_nsuccesses = (NALLOCS + 1 + target_nallocs - 1)
|
||||
/ target_nallocs;
|
||||
expect_zu_eq(
|
||||
hpa_stats.nonderived_stats.alloc_batch_nallocs[target_nallocs],
|
||||
expected_nsuccesses, "");
|
||||
|
||||
for (int i = 0; i < NALLOCS - 1; i++) {
|
||||
pai_dalloc(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue