From 8a868bad58e54d908fcb0b4f4d5103be12e185e5 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 15 Nov 2013 18:21:19 +1100 Subject: [PATCH] time saving log --- lib/middleware/unicorn_oobgc.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/middleware/unicorn_oobgc.rb b/lib/middleware/unicorn_oobgc.rb index 88708dacf52..7edd23700be 100644 --- a/lib/middleware/unicorn_oobgc.rb +++ b/lib/middleware/unicorn_oobgc.rb @@ -49,8 +49,9 @@ module Middleware::UnicornOobgc # While tuning consider printing this out, each time this happens you saved # a user from running a GC inline - # puts "OobGC invoked req count: #{@num_requests} largest delta: #{largest}" + t = Time.now GC.start + puts "OobGC invoked req count: #{@num_requests} largest delta: #{largest} #{((Time.now - t) * 1000).to_i}ms saved" @num_requests = 0 end end