Class: TuneMyGc::Spies::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/tunemygc/spies/base.rb

Instance Method Summary collapse

Constructor Details

#initializeBase

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_uninstallObject



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

#installObject

Raises:

  • (NotImplementedError)


11
12
13
# File 'lib/tunemygc/spies/base.rb', line 11

def install
  raise NotImplementedError
end

#uninstallObject

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/tunemygc/spies/base.rb', line 15

def uninstall
  raise NotImplementedError
end