tunemygc 1.0.16 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/tunemygc.rb +6 -2
- data/lib/tunemygc/agent.rb +14 -0
- data/lib/tunemygc/interposer.rb +2 -0
- data/lib/tunemygc/spies.rb +1 -0
- data/lib/tunemygc/spies/action_controller.rb +2 -3
- data/lib/tunemygc/spies/active_job.rb +2 -3
- data/lib/tunemygc/spies/manual.rb +18 -0
- data/lib/tunemygc/spies/minitest.rb +2 -3
- data/lib/tunemygc/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: edab5ea70a5d450b7947bd53af538d7a125bcf26
|
4
|
+
data.tar.gz: 5153bc0167c5758d290995c39de56702d91e6617
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87096291b0dd67012742a0be010d8d60d487e0cc201004709cc60ed9a77311fec247930837d70b0afbe38250489c9a9743e83172612ebca7128183caf74674db
|
7
|
+
data.tar.gz: 665c300107d8a324a1b161f22ba75fec80fbc642095d75dc7ac2e7554355cbc39a91ce94209fa139b5885541d0e115d3985a61e2c4a52f4eed4acd7a275c61a4
|
data/Gemfile.lock
CHANGED
data/lib/tunemygc.rb
CHANGED
@@ -9,8 +9,12 @@ module TuneMyGc
|
|
9
9
|
"User-Agent" => "TuneMyGC #{TuneMyGc::VERSION}"}.freeze
|
10
10
|
end
|
11
11
|
|
12
|
-
if ENV["RUBY_GC_TUNE"]
|
13
|
-
|
12
|
+
if ENV["RUBY_GC_TUNE"]
|
13
|
+
if defined?(Rails) && Rails.version >= "4.0"
|
14
|
+
require 'tunemygc/railtie'
|
15
|
+
else
|
16
|
+
require 'tunemygc/agent'
|
17
|
+
end
|
14
18
|
else
|
15
19
|
puts "[TuneMyGC] not enabled"
|
16
20
|
end
|
data/lib/tunemygc/agent.rb
CHANGED
@@ -10,6 +10,20 @@ module TuneMyGc
|
|
10
10
|
|
11
11
|
attr_accessor :logger, :interposer, :snapshotter
|
12
12
|
|
13
|
+
# snapshot stages
|
14
|
+
def booted
|
15
|
+
snapshot(:BOOTED)
|
16
|
+
end
|
17
|
+
|
18
|
+
def processing_started
|
19
|
+
snapshot(:PROCESSING_STARTED)
|
20
|
+
end
|
21
|
+
|
22
|
+
def processing_ended
|
23
|
+
snapshot(:PROCESSING_ENDED)
|
24
|
+
interposer.check_uninstall
|
25
|
+
end
|
26
|
+
|
13
27
|
def snapshot(stage, meta = nil)
|
14
28
|
snapshotter.take(stage, meta)
|
15
29
|
end
|
data/lib/tunemygc/interposer.rb
CHANGED
data/lib/tunemygc/spies.rb
CHANGED
@@ -5,14 +5,13 @@ require 'tunemygc/subscriber'
|
|
5
5
|
module TuneMyGc
|
6
6
|
class StartRequestSubscriber < Subscriber
|
7
7
|
def start(name, id, payload)
|
8
|
-
TuneMyGc.
|
8
|
+
TuneMyGc.processing_started
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
12
|
class EndRequestSubscriber < Subscriber
|
13
13
|
def finish(name, id, payload)
|
14
|
-
TuneMyGc.
|
15
|
-
TuneMyGc.interposer.check_uninstall
|
14
|
+
TuneMyGc.processing_ended
|
16
15
|
end
|
17
16
|
end
|
18
17
|
end
|
@@ -46,12 +46,11 @@ module TuneMyGc
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def tunemygc_before_perform
|
49
|
-
TuneMyGc.
|
49
|
+
TuneMyGc.processing_started
|
50
50
|
end
|
51
51
|
|
52
52
|
def tunemygc_after_perform
|
53
|
-
TuneMyGc.
|
54
|
-
TuneMyGc.interposer.check_uninstall
|
53
|
+
TuneMyGc.processing_ended
|
55
54
|
end
|
56
55
|
end
|
57
56
|
end
|
@@ -47,12 +47,11 @@ module TuneMyGc
|
|
47
47
|
|
48
48
|
private
|
49
49
|
def tunemygc_before_setup
|
50
|
-
TuneMyGc.
|
50
|
+
TuneMyGc.processing_started
|
51
51
|
end
|
52
52
|
|
53
53
|
def tunemygc_after_teardown
|
54
|
-
TuneMyGc.
|
55
|
-
TuneMyGc.interposer.check_uninstall
|
54
|
+
TuneMyGc.processing_ended
|
56
55
|
end
|
57
56
|
end
|
58
57
|
end
|
data/lib/tunemygc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tunemygc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bear Metal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -146,6 +146,7 @@ files:
|
|
146
146
|
- lib/tunemygc/spies.rb
|
147
147
|
- lib/tunemygc/spies/action_controller.rb
|
148
148
|
- lib/tunemygc/spies/active_job.rb
|
149
|
+
- lib/tunemygc/spies/manual.rb
|
149
150
|
- lib/tunemygc/spies/minitest.rb
|
150
151
|
- lib/tunemygc/subscriber.rb
|
151
152
|
- lib/tunemygc/syncer.rb
|