class Trashed::Instruments::GctoolsOobgc
Tracks out of band GCs that occurred since the last request.
Public Instance Methods
measure(state, timings, gauges)
click to toggle source
# File lib/trashed/instruments/gctools_oobgc.rb, line 23 def measure(state, timings, gauges) end
start(state, timings, gauges)
click to toggle source
# File lib/trashed/instruments/gctools_oobgc.rb, line 5 def start(state, timings, gauges) last = state[:persistent][:oobgc] || Hash.new(0) current = { :count => GC::OOB.stat(:count).to_i, :major => GC::OOB.stat(:major).to_i, :minor => GC::OOB.stat(:minor).to_i, :sweep => GC::OOB.stat(:sweep).to_i } timings.update \ :'OOBGC.count' => current[:count] - last[:count], :'OOBGC.major_count' => current[:major] - last[:major], :'OOBGC.minor_count' => current[:minor] - last[:minor], :'OOBGC.sweep_count' => current[:sweep] - last[:sweep] state[:persistent][:oobgc] = current end