Class: LogStash::Instrument::PeriodicPoller::JVM::GarbageCollectorName

Inherits:
Object
  • Object
show all
Defined in:
lib/logstash/instrument/periodic_poller/jvm.rb

Constant Summary collapse

YOUNG_GC_NAMES =
Set.new(["Copy", "PS Scavenge", "ParNew", "G1 Young Generation", "scavenge", "GPGC New"])
OLD_GC_NAMES =
Set.new(["MarkSweepCompact", "PS MarkSweep", "ConcurrentMarkSweep", "G1 Old Generation", "global", "GPGC Old"])
YOUNG =
:young
OLD =
:old

Class Method Summary collapse

Class Method Details

.get(gc_name) ⇒ Object



29
30
31
32
33
34
35
# File 'lib/logstash/instrument/periodic_poller/jvm.rb', line 29

def self.get(gc_name)
  if YOUNG_GC_NAMES.include?(gc_name)
    YOUNG
  elsif(OLD_GC_NAMES.include?(gc_name))
    OLD
  end
end