Sha256: 4757dad2d194cb317aa58e1cb8a8d3e632fc362d504bf96db99ab4bacb3279e6
Contents?: true
Size: 473 Bytes
Versions: 6
Compression:
Stored size: 473 Bytes
Contents
class Eye::Checker::Memory < Eye::Checker # checks :memory, :every => 3.seconds, :below => 80.megabytes, :times => [3,5] param :below, [Fixnum, Float], true def check_name @check_name ||= "memory(#{human_value(below)})" end def get_value Eye::SystemResources.memory(@pid).to_i * 1024 end def human_value(value) "#{value.to_i / 1024 / 1024}Mb" end def good?(value) if below value < below else true end end end
Version data entries
6 entries across 6 versions & 2 rubygems