Periodically monitors the output of a callback function by calling it at a certain rate and compares it with a provided model to insure the value doesn't vary greatly within a degree of tolerance provided by the variance function. More...
Public Member Functions | |
def | __init__ |
initializes the monitor but doesn't start it | |
def | get_ret_vals |
If max_calls sets to automatically terminate, return the ret vals. | |
def | has_failed |
def | start |
begins the monitor TODO DOCS | |
def | stop |
stops the monitor | |
def | wait_for_completion |
Public Attributes | |
args | |
beg_time | |
cb | |
contincency_args | |
contingency | |
failure | |
is_running | |
max_calls | |
mean_model | |
model_index | |
num_calls | |
rate | |
ret | |
std_devs | |
thread | |
variance_model | |
Private Member Functions | |
def | _run |
Periodically monitors the output of a callback function by calling it at a certain rate and compares it with a provided model to insure the value doesn't vary greatly within a degree of tolerance provided by the variance function.
Definition at line 78 of file periodic_funs.py.
def kelsey_sandbox.periodic_funs.PeriodicMonitor.__init__ | ( | self, | |
callback, | |||
rate = 0.01 , |
|||
args = None |
|||
) |
initializes the monitor but doesn't start it
callback | the function to be called each time |
rate | the rate in seconds at which to call the callback |
args | the function arguments to pass into the callback |
Definition at line 85 of file periodic_funs.py.
def kelsey_sandbox.periodic_funs.PeriodicMonitor._run | ( | self | ) | [private] |
Definition at line 125 of file periodic_funs.py.
If max_calls sets to automatically terminate, return the ret vals.
Definition at line 178 of file periodic_funs.py.
Definition at line 184 of file periodic_funs.py.
def kelsey_sandbox.periodic_funs.PeriodicMonitor.start | ( | self, | |
mean_model, | |||
variance_model, | |||
std_devs = 2.5 , |
|||
max_calls = None , |
|||
contingency = None , |
|||
contingency_args = None |
|||
) |
begins the monitor TODO DOCS
max_calls | the maximum number of times to call the callback |
Definition at line 103 of file periodic_funs.py.
stops the monitor
Definition at line 169 of file periodic_funs.py.
def kelsey_sandbox.periodic_funs.PeriodicMonitor.wait_for_completion | ( | rate = 0.01 | ) |
Definition at line 188 of file periodic_funs.py.
Definition at line 85 of file periodic_funs.py.
Definition at line 85 of file periodic_funs.py.
Definition at line 85 of file periodic_funs.py.
Definition at line 103 of file periodic_funs.py.
Definition at line 103 of file periodic_funs.py.
Definition at line 85 of file periodic_funs.py.
Definition at line 85 of file periodic_funs.py.
Definition at line 103 of file periodic_funs.py.
Definition at line 85 of file periodic_funs.py.
Definition at line 103 of file periodic_funs.py.
Definition at line 85 of file periodic_funs.py.
Definition at line 85 of file periodic_funs.py.
Definition at line 85 of file periodic_funs.py.
Definition at line 85 of file periodic_funs.py.
Definition at line 85 of file periodic_funs.py.
Definition at line 85 of file periodic_funs.py.