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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b2e54a9c9fc7d9ef4b92bc45f8f0ecbc52105af2
4
- data.tar.gz: 7961fe5c7ae2c6feb83cfd5c08e00d73b9cbe4f8
3
+ metadata.gz: ccd559dc4814ccc1d74e657002fd06ccc225661a
4
+ data.tar.gz: 1e8d7dedad441f91a5cc48843817e69ee37c8076
5
5
  SHA512:
6
- metadata.gz: 4a38e82f8384ce51edc22282b536047f1f38a3c33cc4e465bbfdf22e81720e928fbce9e8eda575a5e3e8906faa9c113afde036d4955cda6ee3e6b7cf5bdf9989
7
- data.tar.gz: bf0b0b27b2e44bd742b6374b351f5736d2cdbc8742346d218cfbd9ecc9da314271c32f69b6a4aeb30efd5bcc5be8e4d185b6871a291c3dc3c1009ac0ab1d8046
6
+ metadata.gz: bf8a26c1f4c83605ec4d07154daef9d848a9db27baad3d18e771051036d7abf57697683443809037065cd3a7d3e59b5b8a05efbdbe38adc7d9fc29152b997859
7
+ data.tar.gz: e715af573d970f2899f7b66b38a58026aac32727465086590621feeac24d23b2a15ecb3449febb8847f2b0993711530f4e5a219e64d6cc421b498c442e8fa086
@@ -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
- @data[Thread.current.object_id] ||= {}
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
- @data.delete(Thread.current.object_id)
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.measure_block(string, "redis".freeze) do
12
+ RorVsWild.agent.measure_section(string, "redis".freeze) do
13
13
  process_without_rorvswild(commands, &block)
14
14
  end
15
15
  end
@@ -1,3 +1,3 @@
1
1
  module RorVsWild
2
- VERSION = "1.0.0-alpha2".freeze
2
+ VERSION = "1.0.0-alpha3".freeze
3
3
  end
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.alpha2
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-22 00:00:00.000000000 Z
11
+ date: 2017-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler