Class: Eye::Checker::Runtime
- Inherits:
-
Eye::Checker
- Object
- Eye::Checker
- Eye::Checker::Runtime
- Defined in:
- lib/eye/checker/runtime.rb
Constant Summary
Constants inherited from Eye::Checker
Instance Attribute Summary
Attributes inherited from Eye::Checker
#check_count, #options, #pid, #process, #type, #value, #values
Instance Method Summary collapse
Methods inherited from Eye::Checker
#check, #check_name, create, #defer, depends_on, get_class, #get_value_safe, #initialize, #inspect, #last_human_values, #logger_sub_tag, #logger_tag, #max_tries, #min_tries, name_and_class, #previous_value, register, #run_in_process_context, validate!
Methods included from Dsl::Validation
Constructor Details
This class inherits a constructor from Eye::Checker
Instance Method Details
#get_value ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/eye/checker/runtime.rb', line 7 def get_value st = Eye::SystemResources.start_time(@pid) if st Time.now.to_i - st.to_i else 0 end end |
#good?(value) ⇒ Boolean
20 21 22 23 24 25 26 |
# File 'lib/eye/checker/runtime.rb', line 20 def good?(value) if below value < below else true end end |
#human_value(value) ⇒ Object
16 17 18 |
# File 'lib/eye/checker/runtime.rb', line 16 def human_value(value) "#{value / 60}m" end |