tunemygc 1.0.40 → 1.0.41
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/README.md +42 -0
- data/lib/tunemygc/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: 412b0a95adf194d9b20522a8e776cc765ea39be3
|
4
|
+
data.tar.gz: 40399148bd59d73763bbc0f5113022711fb44de1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b117e8a87e5e4c35037d26edb02c8fce1ed82b679e02f54f194fc0ade12a00a1a47c297da8aac19dae1cc1d736ea15da0eecef547260c4985ff1db2ac1b7f24
|
7
|
+
data.tar.gz: ece06294a38927bd3c9538d3356e32b69ba171c08739fcf909fe7d4e48ea2e2f9d77f3b9347dba8ccfa96540887382ceaaf83a5b14490ace71992e7e32c0ac11
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -151,6 +151,48 @@ We're busy working on adding tips on the report URLs for some common problem con
|
|
151
151
|
|
152
152
|
We have a [Heroku](http://www.heroku.com) addon in Alpha testing and the Ruby GC lends itself well to tuning through [12 factor](http://12factor.net) principles as it's designed around environment variables.
|
153
153
|
|
154
|
+
#### Custom hooks for add hoc scripts
|
155
|
+
|
156
|
+
Here's an example of instrumenting a custom worker script:
|
157
|
+
|
158
|
+
``` ruby
|
159
|
+
# inject the agent and force the manual spy
|
160
|
+
ENV['RUBY_GC_SPY'] ||= 'manual'
|
161
|
+
require 'tunemygc'
|
162
|
+
|
163
|
+
require 'timeout'
|
164
|
+
require 'queue_classic'
|
165
|
+
|
166
|
+
FailedQueue = QC::Queue.new("failed_jobs")
|
167
|
+
|
168
|
+
class MyWorker < QC::Worker
|
169
|
+
def handle_failure(job, e)
|
170
|
+
FailedQueue.enqueue(job[:method], *job[:args])
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
worker = MyWorker.new
|
175
|
+
|
176
|
+
trap('INT') { exit }
|
177
|
+
trap('TERM') { worker.stop }
|
178
|
+
|
179
|
+
# Signal we're ready to start doing work
|
180
|
+
TuneMyGc.booted
|
181
|
+
|
182
|
+
loop do
|
183
|
+
job = worker.lock_job
|
184
|
+
Timeout::timeout(5) do
|
185
|
+
# signal the start of a unit of work
|
186
|
+
TuneMyGc.processing_started
|
187
|
+
worker.process(job)
|
188
|
+
# signal the end of a unit of work
|
189
|
+
TuneMyGc.processing_ended
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
# When the process exits, results are synced with the TuneMyGC service
|
194
|
+
```
|
195
|
+
|
154
196
|
## Security and privacy concerns
|
155
197
|
|
156
198
|
We don't track any data specific to your application other than a simple environment header which allows us to pick the best tuner for your setup:
|
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.41
|
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-03-
|
11
|
+
date: 2015-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|