diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2023-08-16 14:05:32 -0400 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2023-08-17 15:53:00 -0400 |
| commit | 5db8b9b366271fb2ec25ca76722a3d25a4bb7de7 (patch) | |
| tree | c1137cae3fd2b48d17c3589fd137f8ae2d015a20 /test | |
| parent | 52506cbf516da1a606fad6a6779ab6136c4f353b (diff) | |
Move total_freed_objects to size pool
This commit moves the `total_freed_objects` statistic to the size pool
which allows for `total_freed_objects` key in `GC.stat_heap`.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/8231
Diffstat (limited to 'test')
| -rw-r--r-- | test/ruby/test_gc.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 7513aca46d..8d77e65bbe 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -165,6 +165,8 @@ class TestGc < Test::Unit::TestCase assert_operator stat_heap[:force_major_gc_count], :>=, 0 assert_operator stat_heap[:force_incremental_marking_finish_count], :>=, 0 assert_operator stat_heap[:total_allocated_objects], :>=, 0 + assert_operator stat_heap[:total_freed_objects], :>=, 0 + assert_operator stat_heap[:total_freed_objects], :<=, stat_heap[:total_allocated_objects] end GC.stat_heap(0, stat_heap) @@ -220,6 +222,7 @@ class TestGc < Test::Unit::TestCase assert_equal stat[:total_allocated_pages], stat_heap_sum[:total_allocated_pages] assert_equal stat[:total_freed_pages], stat_heap_sum[:total_freed_pages] assert_equal stat[:total_allocated_objects], stat_heap_sum[:total_allocated_objects] + assert_equal stat[:total_freed_objects], stat_heap_sum[:total_freed_objects] end def test_latest_gc_info |
