| Total Complexity | 0 | 
| Total Lines | 38 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | """Settings file for the NApp kytos/of_stats."""  | 
            ||
| 2 | from pathlib import Path  | 
            ||
| 3 | from threading import Lock  | 
            ||
| 4 | |||
| 5 | #: Seconds to wait before asking for more statistics.  | 
            ||
| 6 | #: Delete RRDs everytime this interval is changed  | 
            ||
| 7 | STATS_INTERVAL = 60  | 
            ||
| 8 | # STATS_INTERVAL = 1 # 1 second for testing - check RRD._get_archives()  | 
            ||
| 9 | |||
| 10 | #: Avoid segmentation fault  | 
            ||
| 11 | rrd_lock = Lock()  | 
            ||
| 12 | |||
| 13 | # RRD Tool Settings  | 
            ||
| 14 | |||
| 15 | DIR = Path(__file__).resolve().parent / 'rrd'  | 
            ||
| 16 | |||
| 17 | # If no new data is supplied for more than *_TIMEOUT* seconds,  | 
            ||
| 18 | # the temperature becomes *UNKNOWN*.  | 
            ||
| 19 | TIMEOUT = 2 * STATS_INTERVAL  | 
            ||
| 20 | |||
| 21 | # Minimum accepted value  | 
            ||
| 22 | MIN = 0  | 
            ||
| 23 | |||
| 24 | # Maximum accepted value is the maximum PortStats attribute value.  | 
            ||
| 25 | MAX = 2 ** 64 - 1  | 
            ||
| 26 | |||
| 27 | # The xfiles factor defines what part of a consolidation interval may be  | 
            ||
| 28 | # made up from *UNKNOWN* data while the consolidated value is still  | 
            ||
| 29 | # regarded as known. It is given as the ratio of allowed *UNKNOWN* PDPs  | 
            ||
| 30 | # to the number of PDPs in the interval. Thus, it ranges from 0 to 1  | 
            ||
| 31 | # (exclusive).  | 
            ||
| 32 | XFF = '0.5'  | 
            ||
| 33 | |||
| 34 | # How long to keep the data. Accepts s (seconds), m (minutes), h (hours),  | 
            ||
| 35 | # d (days), w (weeks), M (months), and y (years).  | 
            ||
| 36 | # Must be a multiple of consolidation steps.  | 
            ||
| 37 | PERIOD = '30d'  | 
            ||
| 38 |