Module: Gitlab::Metrics::Memory
Constant Summary collapse
- HEAP_SLOTS_PER_PAGE =
GC::INTERNAL_CONSTANTS[:HEAP_PAGE_OBJ_LIMIT]
Instance Method Summary collapse
Instance Method Details
#gc_heap_fragmentation(gc_stat = GC.stat) ⇒ Object
10 11 12 |
# File 'lib/gitlab/metrics/memory.rb', line 10 def gc_heap_fragmentation(gc_stat = GC.stat) 1 - (gc_stat[:heap_live_slots] / (HEAP_SLOTS_PER_PAGE * gc_stat[:heap_eden_pages].to_f)) end |