Sha256: f15342bbc154184052b8ccf32d973668d35c06047f698c3a29fa4cd81b0791e9
Contents?: true
Size: 788 Bytes
Versions: 12
Compression:
Stored size: 788 Bytes
Contents
#!/usr/bin/env ruby # encoding: UTF-8 require File.expand_path('../test_helper', __FILE__) class MeasureGCTimeTest < Test::Unit::TestCase include MemoryTestHelper def test_gc_time_mode RubyProf::measure_mode = RubyProf::GC_TIME assert_equal(RubyProf::GC_TIME, RubyProf::measure_mode) end def test_gc_time_enabled_defined assert(defined?(RubyProf::GC_TIME_ENABLED)) end if RubyProf::GC_TIME_ENABLED def test_gc_time RubyProf::measure_mode = RubyProf::GC_TIME RubyProf.enable_gc_stats_if_needed t = RubyProf.measure_gc_time assert_kind_of Float, t GC.start u = RubyProf.measure_gc_time assert u > t, [t, u].inspect memory_test_helper ensure RubyProf.disable_gc_stats_if_needed end end end
Version data entries
12 entries across 10 versions & 2 rubygems