# File lib/new_relic/agent/vm/rubinius_vm.rb, line 40
        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?
            # Rubinius < 2.5.8 metric names
            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
            # Rubinius >= 2.5.8 metric names and no total metrics
            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