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 +4 -4
- data/lib/simple_apm.rb +6 -6
- data/lib/simple_apm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f00229343a9f420187b1e9f99244301f694d5ecb57b3304c0e2f7a14cc40245
|
4
|
+
data.tar.gz: 34dff9b691a69ec786beb0f5ce04dee5031f3d9291348eeffb7c04d5ff5bf180
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|
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
|
data/lib/simple_apm/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2018-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|