tunemygc 1.0.37 → 1.0.38

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: a60e4b7c8d0d39dfc5a6200f533e5274f982bafb
4
- data.tar.gz: 8e3e14b2d97606a7f7226f00850e4b8979e77a7a
3
+ metadata.gz: 9074b8798ec2152f0cc0118978874cc7a7633741
4
+ data.tar.gz: d5bfe7dc5d64d750043ea3e746db62ada122f4ad
5
5
  SHA512:
6
- metadata.gz: 6294e0843166c4b2eee273bae41f1b5b9feebfe84274daa9af51783e8d4485e599d1ac640129b4e7adc26d2c1186ef7cf7364a00b4acd544d4192eb36bae5245
7
- data.tar.gz: 60758c3c8573d9ebd4dcd062346d39ca63f1b2b2e134b88d76da20217c4132b7d4a5f69ef1f13d4fdfad1aa269053339e17f131fca7eb03ef44bfd9c0b2d54d6
6
+ metadata.gz: 6d0ac6b6322fc33c5ff000fee1111411c4035c190224d162e47cfc42ad672073b033350a7dcf6d93d4ee69ceb1dfe8a4b10c805c51ed50a7a1c92fa5492dbc8f
7
+ data.tar.gz: 2143807442db9579cea527ff150ae81d0ea6460a365ef26d2dc962815137e4c8f40d2435fac8a58e2ef4cdd14cc4f044e2362b143767ccb3ec5a91ccfe6b4967
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tunemygc (1.0.37)
4
+ tunemygc (1.0.38)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -108,9 +108,9 @@ And after some profiling requests, when the process terminates, you can visit th
108
108
 
109
109
  #### Advanced
110
110
 
111
- * `RUBY_GC_SPY=action_controller` (Spy on the GC for this type of processing. `action_controller`, `active_job`, `minitest` or `rspec` are supported)
111
+ * `RUBY_GC_SPY=action_controller` (Spy on the GC for this type of processing. `action_controller`, `active_job`, `que_job`, `minitest` or `rspec` are supported)
112
112
 
113
- Defines what type of processing you would like to sample for GC activity. An Action Controller spy is the default, but [ActiveJob](https://github.com/rails/rails/tree/master/activejob), [minitest](https://github.com/seattlerb/minitest) and [rspec](http://rspec.info) are also supported as experimental features.
113
+ Defines what type of processing you would like to sample for GC activity. An Action Controller spy is the default, but [ActiveJob](https://github.com/rails/rails/tree/master/activejob), [que](https://github.com/chanks/que), [minitest](https://github.com/seattlerb/minitest) and [rspec](http://rspec.info) are also supported as experimental features.
114
114
 
115
115
  ## How do I use this?
116
116
 
@@ -13,6 +13,7 @@ module TuneMyGc
13
13
  spy :ActiveJob, 'active_job'
14
14
  spy :Manual, 'manual'
15
15
  spy :Rspec, 'rspec'
16
+ spy :QueJob, 'que_job'
16
17
 
17
18
  def self.id
18
19
  @spies.key(current)
@@ -26,4 +27,4 @@ module TuneMyGc
26
27
  end
27
28
  end
28
29
  end
29
- end
30
+ end
@@ -0,0 +1,58 @@
1
+ # encoding: utf-8
2
+
3
+ require 'que'
4
+
5
+ module TuneMyGc
6
+ module Spies
7
+ class QueJob < TuneMyGc::Spies::Base
8
+ def install
9
+ ::Que::Job.__send__(:include, TuneMyGc::Spies::QueJob::Hooks)
10
+ TuneMyGc.log "hooked: que_job"
11
+ end
12
+
13
+ def uninstall
14
+ TuneMyGc.uninstall_gc_tracepoint
15
+ TuneMyGc.log "uninstalled GC tracepoint"
16
+ ::Que::Job.__send__(:include, TuneMyGc::Spies::QueJob::DisabledHooks)
17
+ TuneMyGc.log "uninstalled que_job spy"
18
+ end
19
+
20
+ module Hooks
21
+ def run(*args)
22
+ self.class.tunemygc_before_run
23
+ super
24
+ ensure
25
+ self.class.tunemygc_after_run
26
+ end
27
+
28
+ def self.included(klass)
29
+ klass.extend(TuneMyGc::Spies::QueJob::Hooks::ClassMethods)
30
+ end
31
+
32
+ module ClassMethods
33
+ def tunemygc_before_run
34
+ TuneMyGc.processing_started
35
+ end
36
+
37
+ def tunemygc_after_run
38
+ TuneMyGc.processing_ended
39
+ end
40
+ end
41
+ end
42
+
43
+ module DisabledHooks
44
+ def self.included(klass)
45
+ klass.extend(TuneMyGc::Spies::QueJob::DisabledHooks::ClassMethods)
46
+ end
47
+
48
+ module ClassMethods
49
+ def tunemygc_before_run
50
+ end
51
+
52
+ def tunemygc_after_run
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module TuneMyGc
4
- VERSION = "1.0.37"
4
+ VERSION = "1.0.38"
5
5
  end
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.37
4
+ version: 1.0.38
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 00:00:00.000000000 Z
11
+ date: 2015-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -129,6 +129,7 @@ files:
129
129
  - lib/tunemygc/spies/base.rb
130
130
  - lib/tunemygc/spies/manual.rb
131
131
  - lib/tunemygc/spies/minitest.rb
132
+ - lib/tunemygc/spies/que_job.rb
132
133
  - lib/tunemygc/spies/rspec.rb
133
134
  - lib/tunemygc/subscriber.rb
134
135
  - lib/tunemygc/syncer.rb