mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
remove conditions for GC::Profiler in ruby19
This commit is contained in:
parent
3e4d0daedf
commit
af404acf9f
1 changed files with 4 additions and 10 deletions
|
@ -32,20 +32,14 @@ module ActiveSupport
|
|||
end
|
||||
|
||||
class GcRuns < Amount
|
||||
# Ruby 1.9
|
||||
if GC.respond_to?(:count)
|
||||
def measure
|
||||
GC.count
|
||||
end
|
||||
def measure
|
||||
GC.count
|
||||
end
|
||||
end
|
||||
|
||||
class GcTime < Time
|
||||
# Ruby 1.9 with GC::Profiler
|
||||
if defined?(GC::Profiler) && GC::Profiler.respond_to?(:total_time)
|
||||
def measure
|
||||
GC::Profiler.total_time
|
||||
end
|
||||
def measure
|
||||
GC::Profiler.total_time
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue