def __init__(self, ip, port, cluster): ''' Constructor ''' Thread.__init__(self) self.cluster = cluster self._proxy = SocketProxy(ip, port, UDP_MODE)
def __init__(self, cluster): Thread.__init__(self) self.cluster = cluster self._windowSize = 5 self._loopPeriod = 3 self.controller = DeadzoneController() self._deltaPerf = 0.05 self.sleep = sleep
def __init__(self): ''' Constructor ''' Thread.__init__(self) self._proxy = None self._power = 0.0 self._mutex = Lock() self.loopPeriod = 1
def __init__(self, services): ''' Constructor ''' Thread.__init__(self) self.services = services # must be a list of RequestBuffer self.loopPeriod = 1 # in seconds ''' If this variable is set, this class will try to fetch information using the apache proxy. If not, will use the log file instead. ''' self.apache = None
def __init__(self): Server.__init__(self) self._detectProcessor = False Thread.__init__(self) self._startTime = 0 self._finishTime = 0 self._wgProgram = '' self.initcmd = None self._wgParameters = [] #parameters to start the workload generator self._minExecTime = 5 self._wgPath = '' self._dump = None #command dump self._performedCleanUp = False
def __init__(self): ''' Constructor ''' Thread.__init__(self) self.HEADER_FORMAT = '%02d-' self.loopPeriod = 1 self.time = MonitorVariable(header='%sTime' % self.HEADER_FORMAT, format="%5d", func=None) self.time.value = 0 self.power = MonitorVariable(header='%sPower' % self.HEADER_FORMAT, format="%5.1f", func=None) self.varPool = [self.time, self.power] #temporary hard-coded variables: self.lost = MonitorVariable(header='%sLost' % self.HEADER_FORMAT, format="%6.1f", func=None) self.replied = MonitorVariable(header='%sReplied' % self.HEADER_FORMAT, format="%6.1f", func=None) self.incoming = MonitorVariable(header='%sIncoming' % self.HEADER_FORMAT, format="%6.1f", func=None) self.qos = MonitorVariable(header='%sQoS' % self.HEADER_FORMAT, format="%6.4f", func=None) self.predicted = MonitorVariable(header='%sPredicted' % self.HEADER_FORMAT, format="%5.1f", func=None) self.mse = MonitorVariable(header='%sMSE' % self.HEADER_FORMAT, format="%11.1f", func=None) self.delay = MonitorVariable(header='%sDelay' % self.HEADER_FORMAT, format="%7.3f", func=None) self.gamma = MonitorVariable(header='%sGamma' % self.HEADER_FORMAT, format="%3.3f", func=None) self.saturation = MonitorVariable(header='%sSaturation' % self.HEADER_FORMAT, format="%3.3f", func=None) self.dyn_power = MonitorVariable(header='%sDynPower' % self.HEADER_FORMAT, format="%5.1f", func=None) self.varPool.append(self.lost) self.varPool.append(self.replied) self.varPool.append(self.incoming) self.varPool.append(self.qos) self.varPool.append(self.predicted) self.varPool.append(self.mse) self.varPool.append(self.delay) self.varPool.append(self.gamma) self.varPool.append(self.saturation) self.varPool.append(self.dyn_power) self.HEADER_PERIOD = 40 # period to repeat the header on the monitor file self._monFile = None self._mutex = Lock() self.emulatePower = True self.experiment = None
def __init__(self, cluster, predictor): ''' Constructor ''' Thread.__init__(self) self.sectionName = self.__class__.__name__ self._efficientServerList = None self.cluster = cluster self._loopPeriod = 5 #in seconds self._windowSize = 5 #average through windowSize numbers self.predictor = predictor self._gamma = 1.0 #value that multiply the deadzone self.sleep = sleep #sleep function self.predicted = 0.0 self.adjustWindow = 5 #put it on configReader self.gammaIncrease = 0.01 self.gammaDecrease = 0.10 self.dynGamma = False self.MAX_GAMMA = 0.90 self.MIN_GAMMA = 0.00 self.setEfficientServerList(cluster.availableServers[:])
def stop(self): Thread.stop(self) self.cleanUp()