Method: QueryCounter::RequestHelper#qc_log_resource_usage
- Defined in:
- lib/query_counter/request_helper.rb
#qc_log_resource_usage ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/query_counter/request_helper.rb', line 15 def qc_log_resource_usage gc = GC.count - Thread.current[:starting_gc_count] stats = [] stats << "gc: #{gc}" if gc > 0 QueryCounter.current_collector.stats.each do |resource, stat| stats << "#{resource}: #{stat.count} [#{stat.time.to_i}ms]" end logger.info 'Resource Stats ' + stats.join(', ') end |