Module: GCStats::GCLogger::ClassMethods
- Defined in:
- lib/gc_stats/gc_logger.rb
Instance Method Summary collapse
-
#log_process_action(payload) ⇒ Object
ActionController hook to add the process ID and GC info on to the info message to be logged as part of the request event.
Instance Method Details
#log_process_action(payload) ⇒ Object
ActionController hook to add the process ID and GC info on to the info message to be logged as part of the request event.
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/gc_stats/gc_logger.rb', line 13 def log_process_action(payload) = super << "PID: #{Process.pid}" gc_time = GC::Profiler.total_time if gc_time > 0 << "GC: [total_gc_time: #{gc_time*1000} ms |" \ " num_events: #{GC::Profiler.raw_data.count} | major/minor/count:" \ " #{GC.stat[:major_gc_count]}/#{GC.stat[:minor_gc_count]}/#{GC.count}]" end end |