Your IP : 216.73.216.86


Current Path : /lib/fm-agent/library/__pycache__/
Upload File :
Current File : //lib/fm-agent/library/__pycache__/threshold.cpython-36.pyc

3

q��i��@s4ddlZddlZddlZddlZGdd�de�ZdS)�Nc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�	ThresholdcKsPtj|jj�|_|jd�|_|jdd�|_|jdd�|_|jdd�|_	d|_
dS)N�id�delayr�value�operatorF)�logging�	getLogger�	__class__�__name__�log�getrZduration�limitrZreported)�self�kwargs�r�&/usr/lib/fm-agent/library/threshold.py�__init__szThreshold.__init__cCst|j�}|d=|S)Nr)�dict�__dict__)r�staterrr�__getstate__s
zThreshold.__getstate__cCs |jj|�tj|jj�|_dS)N)r�updaterrr	r
r)rrrrr�__setstate__szThreshold.__setstate__cCsP|jdkr|jjd|j�dStt|j�}|jjd||j|j|j�|||j�S)Nz Threshold %s is a null thresholdz9Testing if value (%.2f) is %s threshold %s's limit (%.2f))rr�debugr�getattrr
)rrZ	operationrrr�limit_exceededs
zThreshold.limit_exceededN)r
�
__module__�__qualname__rrrrrrrrrsr)rr�sys�time�objectrrrrr�<module>s