Example #1
0
def auto_calibrate(percent_increase=0.1):
    """
    Automatically calibrate the system using the current values as a baseline, and the specified percent increase
    :param percent_increase: The percent increase above the current value to calibrate to
    :return: None
    """
    current_values = aggregation.get_current_values()
    for k,v in current_values.iteritems():
        set_threshhold(int(k), (1+percent_increase)*v)
Example #2
0
def auto_fail_absolute(floor_val=12.0, ceil_val=20.0):
    """
    Automatically set failure threshholds using absolute values
    :param floor_val: The value for the lower bound
    :param ceil_val: The value for the upper bound
    :return: None
    """
    current_values = aggregation.get_current_values()
    for k,v in current_values.iteritems():
        set_fail_threshhold(int(k), floor_val, ceil_val)
Example #3
0
def auto_fail(floor_percent=0.1, ceil_percent=2.0):
    """
    Automatically set failure threshholds using a percent decrease/increase over current value
    :param floor_percent: The percent decrease to set as the floor
    :param ceil_percent: The percent increase to set as the ceiling
    :return: None
    """
    current_values = aggregation.get_current_values()
    for k,v in current_values.iteritems():
        set_fail_threshhold(int(k), floor_percent*v, ceil_percent*v)