query_counter 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/query_counter.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 754ca4bd6e2eb1b7e40223d2c9b19ab0875b387b88060abfc31972a38737ae15
|
4
|
+
data.tar.gz: a9204b9775d0df87f61443e3f1c6a854dc15e08f002a31fb823a79f09d78855c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20ac3837354edfa08f7e3f40762a726cf4465fa0cd7d2b2c476b8747efbc4ed7726081c417e497e0adab217fbd9edbf1e8e2fbeddafe758bf8a33d50237869dc
|
7
|
+
data.tar.gz: 416e004b81186f3327739fb2bed2d0050362cb055233a936604356396d986950298586f03d8b135a220a6b6caddf97db3b6933fc33bac935bf8d8860fdd444e7
|
data/lib/query_counter.rb
CHANGED
@@ -89,7 +89,7 @@ module QueryCounter
|
|
89
89
|
new_method_name = "#{method_name}_with_instrumentation#{punctuation}"
|
90
90
|
kls.class_eval <<STR
|
91
91
|
def #{new_method_name}(*args)
|
92
|
-
QueryCounter.callbacks[#{callback_name.inspect}].call(args) if QueryCounter.callbacks.has_key?(#{callback_name})
|
92
|
+
::QueryCounter.callbacks[#{callback_name.inspect}].call(args) if ::QueryCounter.callbacks.has_key?(#{callback_name.inspect})
|
93
93
|
started_at = Time.now
|
94
94
|
result = #{original_method_name_with_alias}(*args)
|
95
95
|
::QueryCounter.record(#{resource.inspect}, (Time.now - started_at) * 1_000.0)
|