Class: TuneMyGc::Spies::Base
- Inherits:
-
Object
- Object
- TuneMyGc::Spies::Base
show all
- Defined in:
- lib/tunemygc/spies/base.rb
Instance Method Summary
collapse
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
6
7
8
9
|
# File 'lib/tunemygc/spies/base.rb', line 6
def initialize
@processed = 0
@limit = nil
end
|
Instance Method Details
#check_uninstall ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/tunemygc/spies/base.rb', line 19
def check_uninstall
if ENV["RUBY_GC_TUNE"] && ENV["RUBY_GC_TUNE"] != ""
@limit ||= parse_gc_tune
@processed += 1
if @processed == @limit
uninstall
TuneMyGc.log "kamikaze after #{@processed} of #{@limit} units of work"
TuneMyGc.interposer.kamikaze
end
end
end
|
#install ⇒ Object
11
12
13
|
# File 'lib/tunemygc/spies/base.rb', line 11
def install
raise NotImplementedError
end
|
#uninstall ⇒ Object
15
16
17
|
# File 'lib/tunemygc/spies/base.rb', line 15
def uninstall
raise NotImplementedError
end
|