aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark/gc/gcbench.rb
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/gc/gcbench.rb')
-rw-r--r--benchmark/gc/gcbench.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/benchmark/gc/gcbench.rb b/benchmark/gc/gcbench.rb
index aa92f0827d..12ab042ec3 100644
--- a/benchmark/gc/gcbench.rb
+++ b/benchmark/gc/gcbench.rb
@@ -12,12 +12,11 @@ GC::Profiler.enable
tms = Benchmark.measure{|x|
load script
}
+gc_time = GC::Profiler.total_time
+GC::Profiler.report if RUBY_VERSION >= '2.0.0' # before 1.9.3, report() may run infinite loop
GC::Profiler.disable
-GC::Profiler.report
pp GC.stat
-gc_time = GC::Profiler.total_time
-
puts
puts script
puts Benchmark::CAPTION