about summary refs log tree commit homepage
path: root/test/test_mwrap.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_mwrap.rb')
-rw-r--r--test/test_mwrap.rb38
1 files changed, 0 insertions, 38 deletions
diff --git a/test/test_mwrap.rb b/test/test_mwrap.rb
index eaa65cb..6522167 100644
--- a/test/test_mwrap.rb
+++ b/test/test_mwrap.rb
@@ -59,13 +59,6 @@ class TestMwrap < Test::Unit::TestCase
       res = system(env, *cmd)
       assert res, $?.inspect
       assert_match(/\b1\d{4}\s+[1-9]\d*\s+-e:1$/, tmp.read)
-
-      tmp.rewind
-      tmp.truncate(0)
-      env['MWRAP'] = "dump_path:#{tmp.path},dump_heap:5"
-      res = system(env, *cmd)
-      assert res, $?.inspect
-      assert_match %r{lifespan_stddev}, tmp.read
     end
   end
 
@@ -295,35 +288,4 @@ class TestMwrap < Test::Unit::TestCase
         abort 'freed more than allocated'
     end;
   end
-
-  def test_heap_page_body
-    assert_separately(+"#{<<~"begin;"}\n#{<<~'end;'}")
-    begin;
-      require 'mwrap'
-      require 'rubygems' # use up some memory
-      ap = GC.stat(:heap_allocated_pages)
-      h = {}
-      nr = 0
-      Mwrap::HeapPageBody.each do |addr, gen|
-        nr += 1
-        gen <= GC.count && gen >= 0 or abort "bad generation: #{gen}"
-        (0 == (addr & 16383)) or abort "addr not aligned: #{'%x' % addr}"
-      end
-      if RUBY_VERSION.to_f < 3.1 # 3.1+ uses mmap on platforms we care about
-        nr == ap or abort "HeapPageBody.each missed page #{nr} != #{ap}"
-      end
-      10.times { (1..20000).to_a.map(&:to_s) }
-      3.times { GC.start }
-      Mwrap::HeapPageBody.stat(h)
-      Integer === h[:lifespan_max] or abort 'lifespan_max not recorded'
-      Integer === h[:lifespan_min] or abort 'lifespan_min not recorded'
-      Float === h[:lifespan_mean] or abort 'lifespan_mean not recorded'
-      3.times { GC.start }
-      10.times { (1..20000).to_a.map(&:to_s) }
-      Mwrap::HeapPageBody.stat(h)
-      h[:deathspan_min] <= h[:deathspan_max] or
-        abort 'wrong min/max deathtime'
-      Float === h[:deathspan_mean] or abort 'deathspan_mean not recorded'
-    end;
-  end
 end