Sha256: d87489d019242af316d5380a67173b30d3afcaaaf54b2e4c9406d6caffd1a621
Contents?: true
Size: 791 Bytes
Versions: 17
Compression:
Stored size: 791 Bytes
Contents
module PlainApm module Extensions module ThreadAllocations def start! super @thread_allocation_count_start = now_thread_allocations end def finish! super @thread_allocation_count_finish = now_thread_allocations end def thread_allocations @thread_allocation_count_finish - @thread_allocation_count_start end private if defined?(PlainApm::ObjectTracing) def now_thread_allocations PlainApm::ObjectTracing.total_thread_allocated_objects end else def now_thread_allocations 0 end end end if defined?(ActiveSupport) ActiveSupport::Notifications::Event.prepend(PlainApm::Extensions::ThreadAllocations) end end end
Version data entries
17 entries across 17 versions & 1 rubygems