def gather_stats_from_metrics(snap)
snap.major_gc_count = metric('gc.immix.count''gc.immix.count') + 0
snap.minor_gc_count = metric('gc.young.count''gc.young.count') + 0
if has_metric_totals?
snap.heap_live = metric('memory.large.objects.current''memory.large.objects.current') +
metric('memory.young.objects.current''memory.young.objects.current') +
metric('memory.immix.objects.current''memory.immix.objects.current')
snap.total_allocated_object =
metric('memory.large.objects.total''memory.large.objects.total') +
metric('memory.young.objects.total''memory.young.objects.total') +
metric('memory.immix.objects.total''memory.immix.objects.total')
snap.method_cache_invalidations = metric('vm.inline_cache.resets''vm.inline_cache.resets') + 0
else
snap.heap_live = metric('memory.large.objects''memory.large.objects') +
metric('memory.young.objects''memory.young.objects') +
metric('memory.immix.objects''memory.immix.objects')
snap.method_cache_invalidations = metric('machine.inline_cache.resets''machine.inline_cache.resets') + 0
end
end