simple_apm 1.0.10 → 1.0.11

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
  SHA256:
3
- metadata.gz: 13c4a3af0428d79e6e98ad4e523ccdbc6e62f756aedbecb6289f55c9613c07bc
4
- data.tar.gz: a44fe2e03f9080a7c44354b9923598f3c83028cf3d432363dd8c3feaec157b3e
3
+ metadata.gz: 4f00229343a9f420187b1e9f99244301f694d5ecb57b3304c0e2f7a14cc40245
4
+ data.tar.gz: 34dff9b691a69ec786beb0f5ce04dee5031f3d9291348eeffb7c04d5ff5bf180
5
5
  SHA512:
6
- metadata.gz: d1d2bad5ed7af59fdab080e4ee6345a28f5454c3eab359383ccb343d2d80fe778d3bab84cc06682b68592a765625e8edd91bac365ec341c75c20df57da3a739f
7
- data.tar.gz: fcb8e12ddcc73ba608d8e8ffbfab7303b817fec99aa753846d21dfd7a8abd9475c0c1c8eaeb28d825fa817864df82859f4f504f07e86816e7b1cc1cb83639b56
6
+ metadata.gz: ef569ff7d941ca6e37fd46ae9d53b08775db424078b4958e2af261c12ca8656f2b5b5467dcb22562667de6836314572487cd4490fc9032353091606fab974ae9
7
+ data.tar.gz: efa00748e426847ed4607cfb7d259fa8dbacae316035d968577d6df6416130d9bbf3abb40fd40435c880ef49fae7ef54dbf7c892e6d7676cf480d9a8c5db5071
data/lib/simple_apm.rb CHANGED
@@ -36,7 +36,7 @@ module SimpleApm
36
36
  real_start_time = payload[:real_start_time] || started
37
37
  during = finished - real_start_time
38
38
  th[:net_http_during] += during if th[:net_http_during]
39
- if dev_caller = caller.detect {|c| c.include?(Rails.root.to_s) && !c.include?('/vendor/')}
39
+ if dev_caller = caller.detect { |c| c.include?(Rails.root.to_s) }
40
40
  c = ::Callsite.parse(dev_caller)
41
41
  payload.merge!(:line => c.line, :filename => c.filename.to_s.gsub(Rails.root.to_s, ''), :method => c.method)
42
42
  end
@@ -74,12 +74,12 @@ module SimpleApm
74
74
  @processing_thread && @processing_thread[:events].push(e)
75
75
  end
76
76
  def start!
77
- @main_thread ||= Thread.current
78
- @processing_thread ||= Thread.new do
79
- Thread.current.name = 'simple-apm-processing-thread'
80
- Thread.current[:events] ||= []
77
+ @main_thread ||= ::Thread.current
78
+ @processing_thread ||= ::Thread.new do
79
+ ::Thread.current.name = 'simple-apm-processing-thread' if ::Thread.current.respond_to?(:name)
80
+ ::Thread.current[:events] ||= []
81
81
  loop do
82
- while e = Thread.current[:events].shift
82
+ while e = ::Thread.current[:events].shift
83
83
  ::SimpleApm::Worker.process! e
84
84
  end
85
85
  sleep 0.5
@@ -1,3 +1,3 @@
1
1
  module SimpleApm
2
- VERSION = '1.0.10'
2
+ VERSION = '1.0.11'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - yuanyin.xia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-24 00:00:00.000000000 Z
11
+ date: 2018-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails