mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
enable_stats added back in since Benchmarker doesn't start RubyProf
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
committed by
Jeremy Kemper
parent
0cef199c8e
commit
113b0ec03c
@@ -272,7 +272,15 @@ begin
|
||||
GC.enable
|
||||
end
|
||||
|
||||
# Ruby 1.8 + ruby-prof wrapper
|
||||
# Ruby 1.8 + ruby-prof wrapper (enable/disable stats for Benchmarker)
|
||||
elsif GC.respond_to?(:enable_stats)
|
||||
def with_gc_stats
|
||||
GC.enable_stats
|
||||
yield
|
||||
ensure
|
||||
GC.disable_stats
|
||||
end
|
||||
|
||||
else
|
||||
def with_gc_stats
|
||||
yield
|
||||
|
||||
Reference in New Issue
Block a user