class Takwimu::Instruments::GctoolsOobgc

Tracks out of band GCs that occurred since the last request.

Public Instance Methods

instrument!(state, counters, gauges, timers) click to toggle source
# File lib/takwimu/instruments/gctools_oobgc.rb, line 32
def instrument!(state, counters, gauges, timers)
  last = state[:oobgc]
  cur = state[:oobgc] = current

  counters.update \
    :'OOBGC.count'        => cur[:count] - last[:count],
    :'OOBGC.major_count'  => cur[:major] - last[:major],
    :'OOBGC.minor_count'  => cur[:minor] - last[:minor],
    :'OOBGC.sweep_count'  => cur[:sweep] - last[:sweep]
end
start!(state) click to toggle source
# File lib/takwimu/instruments/gctools_oobgc.rb, line 28
def start!(state)
  state[:oobgc] = current
end

Private Instance Methods

current() click to toggle source
# File lib/takwimu/instruments/gctools_oobgc.rb, line 43
        def 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
  }
end