Sha256: 1f1f6ee40c0d46213c024c689abe2ef7aaaa9fc904b970ab6325b31c2d4d49bf
Contents?: true
Size: 955 Bytes
Versions: 10
Compression:
Stored size: 955 Bytes
Contents
# encoding: utf-8 # This file is distributed under New Relic's license terms. # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details. require 'thread' module NewRelic module Agent module VM class RubiniusVM def snapshot snap = Snapshot.new gather_stats(snap) snap end def gather_stats(snap) snap.gc_runs = GC.count gc_stats = GC.stat[:gc] if gc_stats snap.major_gc_count = gc_stats[:full][:count] if gc_stats[:full] snap.minor_gc_count = gc_stats[:young][:count] if gc_stats[:young] end snap.thread_count = Thread.list.size end SUPPORTED_KEYS = [ :gc_runs, :major_gc_count, :minor_gc_count, :thread_count ].freeze def supports?(key) SUPPORTED_KEYS.include?(key) end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems