time_bandits 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -104,6 +104,8 @@ module ActionController #:nodoc:
104
104
 
105
105
  module ClassMethods
106
106
  def log_process_action(payload) #:nodoc:
107
+ # need to call this to compute DB time/calls
108
+ TimeBandits.consumed
107
109
  messages = super
108
110
  TimeBandits.time_bandits.each do |bandit|
109
111
  messages << bandit.runtime
@@ -89,6 +89,9 @@ module ActionController #:nodoc:
89
89
 
90
90
  seconds = [ Benchmark::measure{ perform_action_without_time_bandits }.real, 0.0001 ].max
91
91
 
92
+ # need to call this to compute DB time/calls
93
+ TimeBandits.consumed
94
+
92
95
  log_message = "Completed in #{sprintf("%.3f", seconds * 1000)}ms"
93
96
 
94
97
  log_message << " ("
@@ -116,6 +119,9 @@ module ActionController #:nodoc:
116
119
 
117
120
  seconds = [ Benchmark::measure{ rescue_action_without_time_bandits(exception) }.real, 0.0001 ].max
118
121
 
122
+ # need to call this to compute DB time/calls
123
+ TimeBandits.consumed
124
+
119
125
  log_message = "Completed in #{sprintf("%.3f", seconds * 1000)}ms"
120
126
 
121
127
  log_message << " ("
@@ -1,3 +1,3 @@
1
1
  module TimeBandits
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: time_bandits
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 0
10
- version: 0.3.0
9
+ - 1
10
+ version: 0.3.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Stefan Kaes
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-11-02 00:00:00 Z
18
+ date: 2013-02-26 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: thread_variables