Permalink
Browse files

Change reporting to use "Oink Log Entry Complete" instead of "Complet…

…ed in"

to avoid clashes/reliance on rails specific logging
  • Loading branch information...
1 parent ab95bf9 commit 063915c4ef10933d5d64aff68e8132980d0e5fe2 Eirik Dentz Sinclair & Noah Davis committed Apr 5, 2011
View
@@ -26,7 +26,7 @@ def call(env)
end
def log_completed
- @logger.info("Completed in")
+ @logger.info("Oink Log Entry Complete")
end
def log_routing(env)
@@ -38,7 +38,7 @@ def print(output)
@pids[pid][:ar_count] = $1.to_i
- elsif line =~ /Completed in/
+ elsif line =~ /Oink Log Entry Complete/
if @pids[pid][:ar_count] > @threshold
@bad_actions[@pids[pid][:action]] ||= 0
@@ -38,7 +38,7 @@ def print(output)
memory_reading = $1.to_i
@pids[pid][:current_memory_reading] = memory_reading
- elsif line =~ /Completed in/
+ elsif line =~ /Oink Log Entry Complete/
@pids[pid][:request_finished] = true
unless @pids[pid][:current_memory_reading] == -1 || @pids[pid][:last_memory_reading] == -1
@@ -37,9 +37,9 @@ def call(env)
log_output.string.should include("rails[#{$$}]")
end
- it "writes 'Completed in' after the request has completed" do
+ it "writes 'Oink Log Entry Complete' after the request has completed" do
get "/no_pigs"
- log_output.string.should include("Completed in")
+ log_output.string.should include("Oink Log Entry Complete")
end
it "logs the action and controller" do
@@ -9,7 +9,7 @@ module Oink::Reports
str = <<-STR
Feb 01 01:58:29 ey04-s00297 rails[4413]: Processing Users#show (for 92.84.151.171 at 2009-02-01 01:58:29) [GET]
Feb 01 01:58:30 ey04-s00297 rails[4413]: Instantiation Breakdown: Total: 51 | User: 51
- Feb 01 01:58:31 ey04-s00297 rails[4413]: Completed in
+ Feb 01 01:58:31 ey04-s00297 rails[4413]: Oink Log Entry Complete
STR
io = StringIO.new(str)
@@ -22,7 +22,7 @@ module Oink::Reports
str = <<-STR
Feb 01 01:58:29 ey04-s00297 rails[4413]: Processing Users#show (for 92.84.151.171 at 2009-02-01 01:58:29) [GET]
Feb 01 01:58:30 ey04-s00297 rails[4413]: Instantiation Breakdown: Total: 50 | User: 50
- Feb 01 01:58:31 ey04-s00297 rails[4413]: Completed in
+ Feb 01 01:58:31 ey04-s00297 rails[4413]: Oink Log Entry Complete
STR
io = StringIO.new(str)
@@ -35,10 +35,10 @@ module Oink::Reports
str = <<-STR
Feb 01 01:58:29 ey04-s00297 rails[4413]: Processing Users#show (for 92.84.151.171 at 2009-02-01 01:58:29) [GET]
Feb 01 01:58:30 ey04-s00297 rails[4413]: Instantiation Breakdown: Total: 51 | User: 51
- Feb 01 01:58:31 ey04-s00297 rails[4413]: Completed in
+ Feb 01 01:58:31 ey04-s00297 rails[4413]: Oink Log Entry Complete
Feb 01 01:58:29 ey04-s00297 rails[4413]: Processing Users#show (for 92.84.151.171 at 2009-02-01 01:58:29) [GET]
Feb 01 01:58:30 ey04-s00297 rails[4413]: Instantiation Breakdown: Total: 51 | User: 51
- Feb 01 01:58:31 ey04-s00297 rails[4413]: Completed in
+ Feb 01 01:58:31 ey04-s00297 rails[4413]: Oink Log Entry Complete
STR
io = StringIO.new(str)
@@ -51,13 +51,13 @@ module Oink::Reports
str = <<-STR
Feb 01 01:58:29 ey04-s00297 rails[4413]: Processing Media#show (for 92.84.151.171 at 2009-02-01 01:58:29) [GET]
Feb 01 01:58:30 ey04-s00297 rails[4413]: Instantiation Breakdown: Total: 51 | User: 51
- Feb 01 01:58:31 ey04-s00297 rails[4413]: Completed in
+ Feb 01 01:58:31 ey04-s00297 rails[4413]: Oink Log Entry Complete
Feb 01 01:58:29 ey04-s00297 rails[4413]: Processing Media#show (for 92.84.151.171 at 2009-02-01 01:58:29) [GET]
Feb 01 01:58:30 ey04-s00297 rails[4413]: Instantiation Breakdown: Total: 51 | User: 51
- Feb 01 01:58:31 ey04-s00297 rails[4413]: Completed in
+ Feb 01 01:58:31 ey04-s00297 rails[4413]: Oink Log Entry Complete
Feb 01 01:58:29 ey04-s00297 rails[4413]: Processing Users#show (for 92.84.151.171 at 2009-02-01 01:58:29) [GET]
Feb 01 01:58:30 ey04-s00297 rails[4413]: Instantiation Breakdown: Total: 51 | User: 51
- Feb 01 01:58:31 ey04-s00297 rails[4413]: Completed in
+ Feb 01 01:58:31 ey04-s00297 rails[4413]: Oink Log Entry Complete
STR
io = StringIO.new(str)
@@ -71,11 +71,11 @@ module Oink::Reports
str = <<-STR
Feb 01 01:58:29 ey04-s00297 rails[4413]: Processing Media#show (for 92.84.151.171 at 2009-02-01 01:58:29) [GET]
Feb 01 01:58:30 ey04-s00297 rails[4413]: Instantiation Breakdown: Total: 24 | User: 24
- Feb 01 01:58:31 ey04-s00297 rails[4413]: Completed in
+ Feb 01 01:58:31 ey04-s00297 rails[4413]: Oink Log Entry Complete
Feb 01 01:58:29 ey04-s00297 rails[4413]: Processing Media#show (for 92.84.151.171 at 2009-02-01 01:58:29) [GET]
Feb 01 01:58:29 ey04-s00297 rails[4413]: Processing Users#show (for 92.84.151.171 at 2009-02-01 01:58:29) [GET]
Feb 01 01:58:30 ey04-s00297 rails[4413]: Instantiation Breakdown: Total: 51 | User: 51
- Feb 01 01:58:31 ey04-s00297 rails[4413]: Completed in
+ Feb 01 01:58:31 ey04-s00297 rails[4413]: Oink Log Entry Complete
STR
io = StringIO.new(str)
@@ -92,7 +92,7 @@ module Oink::Reports
str = <<-STR
Feb 01 01:58:29 ey04-s00297 rails[4413]: Processing Users#show (for 92.84.151.171 at 2009-02-01 01:58:29) [GET]
Feb 01 01:58:30 ey04-s00297 rails[4413]: Instantiation Breakdown: Total: 51 | User: 51
- Feb 01 01:58:31 ey04-s00297 rails[4413]: Completed in
+ Feb 01 01:58:31 ey04-s00297 rails[4413]: Oink Log Entry Complete
STR
io = StringIO.new(str)
@@ -105,7 +105,7 @@ module Oink::Reports
str = <<-STR
Feb 01 01:58:29 ey04-s00297 rails[4413]: Processing Users#show (for 92.84.151.171 at 2009-02-01 01:58:29) [GET]
Feb 01 01:58:30 ey04-s00297 rails[4413]: Instantiation Breakdown: Total: 50 | User: 50
- Feb 01 01:58:31 ey04-s00297 rails[4413]: Completed in
+ Feb 01 01:58:31 ey04-s00297 rails[4413]: Oink Log Entry Complete
STR
io = StringIO.new(str)
@@ -118,10 +118,10 @@ module Oink::Reports
str = <<-STR
Feb 01 01:58:29 ey04-s00297 rails[4413]: Processing DetailsController#show (for 92.84.151.171 at 2009-02-01 01:58:29) [GET]
Feb 01 01:58:30 ey04-s00297 rails[4413]: Instantiation Breakdown: Total: 75 | User: 75
- Feb 01 01:58:31 ey04-s00297 rails[4413]: Completed in
+ Feb 01 01:58:31 ey04-s00297 rails[4413]: Oink Log Entry Complete
Feb 01 01:58:32 ey04-s00297 rails[4413]: Processing MediaController#show (for 92.84.151.171 at 2009-02-01 01:58:29) [GET]
Feb 01 01:58:33 ey04-s00297 rails[4413]: Instantiation Breakdown: Total: 100 | User: 100
- Feb 01 01:58:34 ey04-s00297 rails[4413]: Completed in
+ Feb 01 01:58:34 ey04-s00297 rails[4413]: Oink Log Entry Complete
STR
io = StringIO.new(str)
@@ -138,7 +138,7 @@ module Oink::Reports
str = <<-STR
Feb 01 01:58:32 ey04-s00297 rails[4413]: Processing MediaController#show (for 92.84.151.171 at 2009-02-01 01:58:29) [GET]
Feb 01 01:58:33 ey04-s00297 rails[4413]: Instantiation Breakdown: Total: 100 | User: 100
- Feb 01 01:58:34 ey04-s00297 rails[4413]: Completed in
+ Feb 01 01:58:34 ey04-s00297 rails[4413]: Oink Log Entry Complete
STR
io = StringIO.new(str)
output = PsuedoOutput.new
@@ -150,11 +150,11 @@ module Oink::Reports
str = <<-STR
Feb 01 01:58:29 ey04-s00297 rails[4413]: Processing Media#show (for 92.84.151.171 at 2009-02-01 01:58:29) [GET]
Feb 01 01:58:30 ey04-s00297 rails[4413]: Instantiation Breakdown: Total: 24 | User: 24
- Feb 01 01:58:31 ey04-s00297 rails[4413]: Completed in
+ Feb 01 01:58:31 ey04-s00297 rails[4413]: Oink Log Entry Complete
Feb 01 01:58:29 ey04-s00297 rails[4413]: Processing Media#show (for 92.84.151.171 at 2009-02-01 01:58:29) [GET]
Feb 01 01:58:29 ey04-s00297 rails[4413]: Processing Users#show (for 92.84.151.171 at 2009-02-01 01:58:29) [GET]
Feb 01 01:58:30 ey04-s00297 rails[4413]: Instantiation Breakdown: Total: 51 | User: 51
- Feb 01 01:58:31 ey04-s00297 rails[4413]: Completed in
+ Feb 01 01:58:31 ey04-s00297 rails[4413]: Oink Log Entry Complete
STR
io = StringIO.new(str)
@@ -170,13 +170,13 @@ module Oink::Reports
str1 = <<-STR
Feb 01 01:58:32 ey04-s00297 rails[4413]: Processing MediaController#show (for 92.84.151.171 at 2009-02-01 01:58:29) [GET]
Feb 01 01:58:33 ey04-s00297 rails[4413]: Instantiation Breakdown: Total: 100 | User: 100
- Feb 01 01:58:34 ey04-s00297 rails[4413]: Completed in
+ Feb 01 01:58:34 ey04-s00297 rails[4413]: Oink Log Entry Complete
STR
str2 = <<-STR
Feb 01 01:58:32 ey04-s00297 rails[4413]: Processing MediaController#show (for 92.84.151.171 at 2009-02-01 01:58:29) [GET]
Feb 01 01:58:33 ey04-s00297 rails[4413]: Instantiation Breakdown: Total: 100 | User: 100
- Feb 01 01:58:34 ey04-s00297 rails[4413]: Completed in
+ Feb 01 01:58:34 ey04-s00297 rails[4413]: Oink Log Entry Complete
STR
io1 = StringIO.new(str1)
Oops, something went wrong.

0 comments on commit 063915c

Please sign in to comment.