5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# 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
|