prm/prm/container.py
def contention_detect(self, threshs):
        """ detect resouce contention after find proper utilization bin """
        if not threshs:
            return [], []

        metrics = self.metrics
        for i in range(0, len(threshs)):
            thresh = threshs[i]
            if metrics[Metric.UTIL] < thresh['util_start']:
                if i == 0:
                    return [], []

                return self._detect_in_bin(threshs[i - 1])

            if metrics[Metric.UTIL] >= thresh['util_start']:
                if metrics[Metric.UTIL] < thresh['util_end'] or i == len(threshs) - 1:
                    return self._detect_in_bin(thresh)
 detect resouce contention after find proper utilization bin 
detect resouce contention after find proper utilization bin
detect resouce contention after find proper utilization bin
def contention_detect(self, threshs):
        if not threshs:
            return [], []
        metrics = self.metrics
        for i in range(0, len(threshs)):
            thresh = threshs[i]
            if metrics[Metric.UTIL] < thresh['util_start']:
                if i == 0:
                    return [], []
                return self._detect_in_bin(threshs[i - 1])
            if metrics[Metric.UTIL] >= thresh['util_start']:
                if metrics[Metric.UTIL] < thresh['util_end'] or i == len(threshs) - 1:
                    return self._detect_in_bin(thresh)
def contention_detect ( self , threshs ) : if not threshs : return [ ] , [ ] metrics = self . metrics for i in range ( 0 , len ( threshs ) ) : thresh = threshs [ i ] if metrics [ Metric . UTIL ] < thresh [ 'util_start' ] : if i == 0 : return [ ] , [ ] return self . _detect_in_bin ( threshs [ i - 1 ] ) if metrics [ Metric . UTIL ] >= thresh [ 'util_start' ] : if metrics [ Metric . UTIL ] < thresh [ 'util_end' ] or i == len ( threshs ) - 1 : return self . _detect_in_bin ( thresh )
detect resouce contention after find proper utilization bin
detect resouce contention after find proper utilization bin
""" detect resouce contention after find proper utilization bin """
self
threshs