Include G1 in JVM heap metrics (#10728) (#10784)

This commit is contained in:
Dan Hermann 2019-05-10 16:46:34 -05:00 committed by GitHub
parent a0d05b4da7
commit 5eb569719c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -153,12 +153,15 @@ module LogStash module Instrument module PeriodicPoller
old = {}
old = old.merge!(heap["CMS Old Gen"]) if heap.has_key?("CMS Old Gen")
old = old.merge!(heap["PS Old Gen"]) if heap.has_key?("PS Old Gen")
old = old.merge!(heap["G1 Old Gen"]) if heap.has_key?("G1 Old Gen")
young = {}
young = young.merge!(heap["Par Eden Space"]) if heap.has_key?("Par Eden Space")
young = young.merge!(heap["PS Eden Space"]) if heap.has_key?("PS Eden Space")
young = young.merge!(heap["G1 Eden Space"]) if heap.has_key?("G1 Eden Space")
survivor = {}
survivor = survivor.merge!(heap["Par Survivor Space"]) if heap.has_key?("Par Survivor Space")
survivor = survivor.merge!(heap["PS Survivor Space"]) if heap.has_key?("PS Survivor Space")
survivor = survivor.merge!(heap["G1 Survivor Space"]) if heap.has_key?("G1 Survivor Space")
{
"young" => aggregate_information_for(young),
"old" => aggregate_information_for(old),