Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: BTreeMap: add case for deallocating root node with overflows #213

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

ielashi
Copy link
Contributor

@ielashi ielashi commented Apr 21, 2024

Adds a new test case to verify that deallocating the root node is done correctly, even when the root node contains overflow pages.

NOTE: The logic in btreemap.remove has been slightly modified to be more understandable, but the functionality remains equivalent.

@ielashi ielashi requested a review from a team as a code owner April 21, 2024 06:55
Copy link

canbench 🏋 (dir: .)

No significant performance changes detected ✅

./canbench_results.yml is up to date ✅


---------------------------------------------------

Benchmark: btreemap_insert_blob_4_1024
  total:
    instructions: 601.82 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 123 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_4_1024_v2
  total:
    instructions: 685.72 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 92 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_8_1024
  total:
    instructions: 720.47 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 183 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_8_1024_v2
  total:
    instructions: 811.30 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 138 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_16_1024
  total:
    instructions: 802.98 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 215 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_16_1024_v2
  total:
    instructions: 900.36 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 161 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_32_1024
  total:
    instructions: 852.44 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 230 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_32_1024_v2
  total:
    instructions: 944.16 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 173 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_64_1024
  total:
    instructions: 1.12 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 245 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_64_1024_v2
  total:
    instructions: 1.22 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 183 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_128_1024
  total:
    instructions: 1.38 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 260 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_128_1024_v2
  total:
    instructions: 1.51 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 195 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_256_1024
  total:
    instructions: 1.91 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 292 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_256_1024_v2
  total:
    instructions: 2.10 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 219 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_512_1024
  total:
    instructions: 2.99 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 351 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_512_1024_v2
  total:
    instructions: 3.24 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 263 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_4
  total:
    instructions: 4.79 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 235 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_4_v2
  total:
    instructions: 5.19 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 176 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_8
  total:
    instructions: 4.88 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 237 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_8_v2
  total:
    instructions: 5.27 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 178 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_16
  total:
    instructions: 4.89 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 241 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_16_v2
  total:
    instructions: 5.28 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 181 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_32
  total:
    instructions: 4.91 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 239 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_32_v2
  total:
    instructions: 5.30 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 180 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_64
  total:
    instructions: 4.93 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 250 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_64_v2
  total:
    instructions: 5.32 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 188 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_128
  total:
    instructions: 4.93 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 262 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_128_v2
  total:
    instructions: 5.32 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 196 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_256
  total:
    instructions: 4.94 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 292 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_256_v2
  total:
    instructions: 5.33 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 219 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_512
  total:
    instructions: 5.03 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 348 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_1024_512_v2
  total:
    instructions: 5.43 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 261 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_u64_u64
  total:
    instructions: 438.06 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 7 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_u64_u64_v2
  total:
    instructions: 508.14 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 6 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_u64_blob_8
  total:
    instructions: 426.45 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 7 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_u64_blob_8_v2
  total:
    instructions: 492.82 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 5 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_8_u64
  total:
    instructions: 416.17 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 6 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_blob_8_u64_v2
  total:
    instructions: 514.62 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 4 pages (no change)

---------------------------------------------------

Benchmark: btreemap_insert_10mib_values
  total:
    instructions: 99.51 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 32 pages (no change)

---------------------------------------------------

Benchmark: btreemap_iter_count_small_values
  total:
    instructions: 10.12 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_iter_count_10mib_values
  total:
    instructions: 497.38 K (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_4_1024
  total:
    instructions: 617.07 M (0.08%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_4_1024_v2
  total:
    instructions: 717.03 M (0.07%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_8_1024
  total:
    instructions: 806.04 M (0.08%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_8_1024_v2
  total:
    instructions: 921.74 M (0.07%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_16_1024
  total:
    instructions: 994.84 M (0.08%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_16_1024_v2
  total:
    instructions: 1.13 B (0.06%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_32_1024
  total:
    instructions: 1.07 B (0.10%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_32_1024_v2
  total:
    instructions: 1.20 B (0.09%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_64_1024
  total:
    instructions: 1.38 B (0.07%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_64_1024_v2
  total:
    instructions: 1.52 B (0.07%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_128_1024
  total:
    instructions: 1.69 B (0.06%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_128_1024_v2
  total:
    instructions: 1.84 B (0.06%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_256_1024
  total:
    instructions: 2.31 B (0.04%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_256_1024_v2
  total:
    instructions: 2.46 B (0.04%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_512_1024
  total:
    instructions: 3.60 B (0.02%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_512_1024_v2
  total:
    instructions: 3.75 B (0.02%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_u64_u64
  total:
    instructions: 620.19 M (-0.06%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_u64_u64_v2
  total:
    instructions: 725.36 M (-0.04%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_u64_blob_8
  total:
    instructions: 596.73 M (-0.05%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_u64_blob_8_v2
  total:
    instructions: 692.87 M (-0.04%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_8_u64
  total:
    instructions: 538.42 M (-0.06%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_remove_blob_8_u64_v2
  total:
    instructions: 672.39 M (-0.05%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_4_1024
  total:
    instructions: 242.79 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_4_1024_v2
  total:
    instructions: 324.66 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_8_1024
  total:
    instructions: 282.19 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_8_1024_v2
  total:
    instructions: 363.31 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_16_1024
  total:
    instructions: 361.11 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_16_1024_v2
  total:
    instructions: 445.04 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_32_1024
  total:
    instructions: 405.06 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_32_1024_v2
  total:
    instructions: 488.78 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_64_1024
  total:
    instructions: 649.03 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_64_1024_v2
  total:
    instructions: 732.96 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_128_1024
  total:
    instructions: 878.06 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_128_1024_v2
  total:
    instructions: 976.05 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_256_1024
  total:
    instructions: 1.38 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_256_1024_v2
  total:
    instructions: 1.48 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_512_1024
  total:
    instructions: 2.37 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_512_1024_v2
  total:
    instructions: 2.47 B (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_u64_u64
  total:
    instructions: 234.87 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_u64_u64_v2
  total:
    instructions: 298.87 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_u64_blob_8
  total:
    instructions: 232.00 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_u64_blob_8_v2
  total:
    instructions: 290.96 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_8_u64
  total:
    instructions: 252.25 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: btreemap_get_blob_8_u64_v2
  total:
    instructions: 334.30 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: vec_insert_blob_4
  total:
    instructions: 3.78 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: vec_insert_blob_8
  total:
    instructions: 3.78 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 1 pages (no change)

---------------------------------------------------

Benchmark: vec_insert_blob_16
  total:
    instructions: 3.78 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 2 pages (no change)

---------------------------------------------------

Benchmark: vec_insert_blob_32
  total:
    instructions: 3.78 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 5 pages (no change)

---------------------------------------------------

Benchmark: vec_insert_blob_64
  total:
    instructions: 3.78 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 9 pages (no change)

---------------------------------------------------

Benchmark: vec_insert_blob_128
  total:
    instructions: 3.78 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 19 pages (no change)

---------------------------------------------------

Benchmark: vec_insert_u64
  total:
    instructions: 5.85 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 1 pages (no change)

---------------------------------------------------

Benchmark: vec_get_blob_4
  total:
    instructions: 5.79 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: vec_get_blob_8
  total:
    instructions: 7.03 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: vec_get_blob_16
  total:
    instructions: 9.79 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: vec_get_blob_32
  total:
    instructions: 10.62 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: vec_get_blob_64
  total:
    instructions: 15.31 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: vec_get_blob_128
  total:
    instructions: 20.90 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: vec_get_u64
  total:
    instructions: 6.27 M (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: memory_manager_baseline
  total:
    instructions: 1052 (no change)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 8000 pages (no change)

---------------------------------------------------

Benchmark: memory_manager_overhead
  total:
    instructions: 4.55 M (0.03%) (change within noise threshold)
    heap_increase: 0 pages (no change)
    stable_memory_increase: 8320 pages (no change)

---------------------------------------------------

Benchmark: memory_manager_grow
  total:
    instructions: 286.25 M (0.34%) (change within noise threshold)
    heap_increase: 2 pages (no change)
    stable_memory_increase: 32.00 K pages (no change)

---------------------------------------------------

@ielashi ielashi merged commit 8478862 into main Apr 22, 2024
7 checks passed
@ielashi ielashi deleted the ielashi/root_deallocation branch April 22, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants