Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
comboy committed Apr 2, 2012
1 parent c99046a commit fc620fd
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 110 deletions.
97 changes: 0 additions & 97 deletions Gemfile.lock

This file was deleted.

2 changes: 1 addition & 1 deletion MIT-LICENSE
@@ -1,4 +1,4 @@
Copyright 2012 YOURNAME
Copyright 2012 Kacper Cieśla (comboy)

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
10 changes: 2 additions & 8 deletions lib/sql_queries_count/controller_runtime.rb
Expand Up @@ -2,16 +2,14 @@
module SqlQueriesCount

module ControllerRuntime

extend ActiveSupport::Concern

protected

attr_internal :db_runtime

def process_action(action, *args)
# We also need to reset the runtime before each action
# because of queries in middleware or in cases we are streaming
# and it won't be cleaned up by the method below.
QueryCounter.reset_counter
super
end
Expand All @@ -24,18 +22,14 @@ def append_info_to_payload(payload)
end


#def append_info_to_payload(payload)
# super
# payload[:solr_runtime] = SolrInstrumentation::LogSubscriber.runtime
#end

module ClassMethods
def log_process_action(payload)
messages, sql_count = super, payload[:db_query_count]
messages << ("SQL count: %d" % sql_count) if sql_count
messages
end
end

end

end
Expand Down
4 changes: 0 additions & 4 deletions lib/tasks/sql_queries_count_tasks.rake

This file was deleted.

0 comments on commit fc620fd

Please sign in to comment.