lib/tunemygc/spies/base.rb in tunemygc-1.0.35 vs lib/tunemygc/spies/base.rb in tunemygc-1.0.36
- old
+ new
@@ -15,10 +15,17 @@
def uninstall
raise NotImplementedError
end
def check_uninstall
- raise NotImplementedError
+ if ENV["RUBY_GC_TUNE"]
+ @limit ||= Integer(ENV["RUBY_GC_TUNE"])
+ @processed += 1
+ if @processed == @limit
+ uninstall
+ TuneMyGc.log "kamikaze after #{@processed} of #{@limit} units of work"
+ end
+ end
end
end
end
end
\ No newline at end of file