rorvswild 1.0.0.pre.alpha2 → 1.0.0.pre.alpha3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rorvswild/agent.rb +6 -4
- data/lib/rorvswild/plugin/redis.rb +1 -1
- data/lib/rorvswild/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccd559dc4814ccc1d74e657002fd06ccc225661a
|
4
|
+
data.tar.gz: 1e8d7dedad441f91a5cc48843817e69ee37c8076
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf8a26c1f4c83605ec4d07154daef9d848a9db27baad3d18e771051036d7abf57697683443809037065cd3a7d3e59b5b8a05efbdbe38adc7d9fc29152b997859
|
7
|
+
data.tar.gz: e715af573d970f2899f7b66b38a58026aac32727465086590621feeac24d23b2a15ecb3449febb8847f2b0993711530f4e5a219e64d6cc421b498c442e8fa086
|
data/lib/rorvswild/agent.rb
CHANGED
@@ -20,8 +20,8 @@ module RorVsWild
|
|
20
20
|
@ignored_exceptions = config[:ignored_exceptions]
|
21
21
|
@app_root = config[:app_root]
|
22
22
|
@logger = config[:logger]
|
23
|
-
@data = {}
|
24
23
|
@client = Client.new(config)
|
24
|
+
cleanup_data
|
25
25
|
|
26
26
|
if defined?(Rails)
|
27
27
|
@logger ||= Rails.logger
|
@@ -57,7 +57,7 @@ module RorVsWild
|
|
57
57
|
measure_block(code) { eval(code) }
|
58
58
|
end
|
59
59
|
|
60
|
-
def measure_block(name, kind = "code", &block)
|
60
|
+
def measure_block(name, kind = "code".freeze, &block)
|
61
61
|
data[:name] ? measure_section(name, kind, &block) : measure_job(name, &block)
|
62
62
|
end
|
63
63
|
|
@@ -119,7 +119,7 @@ module RorVsWild
|
|
119
119
|
end
|
120
120
|
|
121
121
|
def data
|
122
|
-
|
122
|
+
Thread.current[:rorvswild_data] ||= {}
|
123
123
|
end
|
124
124
|
|
125
125
|
def add_section(section)
|
@@ -145,7 +145,9 @@ module RorVsWild
|
|
145
145
|
end
|
146
146
|
|
147
147
|
def cleanup_data
|
148
|
-
|
148
|
+
result = Thread.current[:rorvswild_data]
|
149
|
+
Thread.current[:rorvswild_data] = nil
|
150
|
+
result
|
149
151
|
end
|
150
152
|
|
151
153
|
def post_request
|
@@ -9,7 +9,7 @@ module RorVsWild
|
|
9
9
|
|
10
10
|
def process(commands, &block)
|
11
11
|
string = RorVsWild::Plugin::Redis.commands_to_string(commands)
|
12
|
-
RorVsWild.agent.
|
12
|
+
RorVsWild.agent.measure_section(string, "redis".freeze) do
|
13
13
|
process_without_rorvswild(commands, &block)
|
14
14
|
end
|
15
15
|
end
|
data/lib/rorvswild/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rorvswild
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.pre.
|
4
|
+
version: 1.0.0.pre.alpha3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexis Bernard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|