query_counter 0.2.0 → 0.2.1
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/middleware.rb +1 -3
- data/lib/query_counter.rb +6 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb6de4766dc8b0751b1e8cd450a4138517a0f1f0
|
4
|
+
data.tar.gz: c59e4b872729e6d65b996c99591eebbb09b7e5e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5391b34427c25b7cc4f2c099fa2bf26f40c930a0dfb3860ffd9407b1bb6d09c412145d6ed78fbe948594d8ab9aae4e6694cb3154b804c698fdf2ae19540a8ec7
|
7
|
+
data.tar.gz: 8c01c0ddf20dda86042b412c06deb6d8da5f3a072f53d2a2304f7a691718b04463c1fdd583f929a0296b2d1b37f9072421321446523935906b6af61e354c57cf
|
data/lib/query_counter.rb
CHANGED
@@ -31,6 +31,12 @@ module QueryCounter
|
|
31
31
|
current_collector.reset
|
32
32
|
end
|
33
33
|
|
34
|
+
def self.collect
|
35
|
+
Thread.current[:starting_gc_count] = GC.count
|
36
|
+
Thread.current[:starting_count_objects] = ObjectSpace.count_objects
|
37
|
+
reset
|
38
|
+
end
|
39
|
+
|
34
40
|
def self.around
|
35
41
|
new_collector = ::QueryCounter::Collector.new
|
36
42
|
old_collector, Thread.current[:temporary_query_counter_collector] = Thread.current[:temporary_query_counter_collector], new_collector
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: query_counter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Doug Youch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Used for monitoring number of external calls
|
14
14
|
email: dougyouch@gmail.com
|
@@ -41,7 +41,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
41
41
|
version: '0'
|
42
42
|
requirements: []
|
43
43
|
rubyforge_project:
|
44
|
-
rubygems_version: 2.5.
|
44
|
+
rubygems_version: 2.5.2.3
|
45
45
|
signing_key:
|
46
46
|
specification_version: 4
|
47
47
|
summary: Count requests to external systems
|