Class: HeapScope::GCTracker
- Inherits:
-
Object
- Object
- HeapScope::GCTracker
- Defined in:
- lib/heapscope/aging.rb
Overview
Tracks GC stats around workloads for recovery correlation.
Instance Method Summary collapse
- #correlation ⇒ Object
-
#initialize ⇒ GCTracker
constructor
A new instance of GCTracker.
- #mark(label) ⇒ Object
Constructor Details
#initialize ⇒ GCTracker
Returns a new instance of GCTracker.
74 75 76 |
# File 'lib/heapscope/aging.rb', line 74 def initialize @points = [] end |
Instance Method Details
#correlation ⇒ Object
92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/heapscope/aging.rb', line 92 def correlation return {} if @points.size < 2 first = @points.first last = @points.last { points: @points, major_gc_delta: delta(last[:gc_stat][:major_gc_count], first[:gc_stat][:major_gc_count]), minor_gc_delta: delta(last[:gc_stat][:minor_gc_count], first[:gc_stat][:minor_gc_count]), live_slots_delta: delta(last[:gc_stat][:heap_live_slots], first[:gc_stat][:heap_live_slots]), rss_delta: delta(last[:rss_bytes], first[:rss_bytes]) } end |