def __init__(self): Builder.__init__(self, PerfRegulator) #option strings self.LOOP_PERIOD = 'loopperiod' self.QOS_WINDOW_SIZE = 'qoswindowsize' self.LOAD_WINDOWSIZE = 'loadwindowsize' self.SETPOINT = 'setpoint'
def __init__(self, targetClass=None): if not targetClass: targetClass = Experiment Builder.__init__(self, targetClass) #sections self.EXPERIMENT = 'Experiment' self.SERVICE_MONITOR = 'RequestMonitor' self.CLUSTER = 'Cluster' self.PREDICTOR = 'Predictor' self.PERFREGULATOR = 'PerfRegulator' self.POWERMONITOR = 'PowerMonitor' self.APACHE = 'XMLRPCProxy' self.CONFIGURATOR = 'Configurator' #options self.TRACE = 'trace' self.USE_CONFIGURATOR = 'useconfigurator' self.USE_PERFREGULATOR = 'useperfregulator' self.DESCRIPTION = 'description' self.PLOT = 'plot' self.IP = 'ip' self.MAC_ADDR = 'mac' self.NETWORK_INTERFACE = 'eth' self.WORKGEN_PROGRAM = 'workgenprogram' self.WORKGEN_PARAMETERS = 'workgenparameters' self.WORKGEN_MIN_EXECUTION_TIME = 'workgenminexectime' self.WORKGEN_PATH = 'workgenpath' self.WORKGEN_MACHINE = 'workgenmachine' self.WORKGEN_INITCMD = 'workgeninitcmd'
def __init__(self, sectionName, targetClass=None): if not targetClass: targetClass = EnergyModel Builder.__init__(self, targetClass) self.sectionName = sectionName #option strings self.BUSY_POWER = 'busypower' self.IDLE_POWER = 'idlepower' self.PEAK_PERFORMANCE = 'peakperformance'
def __init__(self, targetClass=None): if not targetClass: targetClass = Configurator Builder.__init__(self, targetClass) #option strings self.LOOP_PERIOD = 'loopperiod' self.WINDOW_SIZE = 'windowsize' self.GAMMA = 'gamma' self.ADJUST_GAMMA = 'adjustgamma' self.GAMMA_INCR = 'gammaincrease' self.GAMMA_DECR = 'gammadecrease' self.ADJUST_WINDOW = 'adjustwindow'
def __init__(self, sectionName, targetClass=None): if not targetClass: targetClass = Server Builder.__init__(self, targetClass) self.sectionName = sectionName #option strings self.HOSTNAME = 'hostname' self.IP = 'ip' self.FREQS = 'freqs' self.MAC_ADDR = 'mac' self.NETWORK_INTERFACE = 'eth' self.APACHE_PATH = 'apachePath' self.DVFSCONTROLLER = 'dvfscontroller'
def build(self, cr, *args): cluster = Builder.build(self, cr, *args) server_sections = cr.getValue(self.sectionName, self.SERVERS, eval) for section in server_sections: server = ServerBuilder(section).build(cr) cluster.join(server) return cluster
def build(self, cr, *args): cluster = Builder.build(self, cr, *args) server_sections = cr.getValue(self.sectionName,self.SERVERS, eval) for section in server_sections: server = ServerBuilder(section).build(cr) #assert isinstance(server, Server) cluster.join(server) return cluster
def build(self, cr): server = Builder.build(self, cr) energyModel = EnergyModelBuilder(self.sectionName).build(cr, server) server.energyModel = energyModel ''' This section builds a DVFSController. Every server must have a different instance of DVFSController, however each section at the configuration file usually represents one single instance (that can be shared among many objects). Therefore, it's the ServerBuilder that must create and link himself with the DVFSController. ''' deps = [server] server.dvfsCont = self.buildObject(cr, 'DVFSController', deps) return server
def buildObject(self, cr, sectionName, exp): ''' Automatically fetches the dependencies from the Experiment instance and hands them to the conventional method. ''' sections = cr.getValue(sectionName, 'dependencies', eval, required=False) ''' Transforms the string list of dependencies into a list of objects that represents those dependencies ''' deps = [] if sections: for section in sections: attr = '_' + section.lower() if hasattr(exp, attr): deps.append(eval('exp.' + attr)) return Builder.buildObject(self, cr, sectionName, deps)
def __init__(self, targetClass=None): if not targetClass: targetClass = LoadBalancer Builder.__init__(self, targetClass)
def __init__(self): Builder.__init__(self, ResourceMonitor) self.PORT = 'port' self.HOST = 'host'
def __init__(self): Builder.__init__(self, RequestMonitor) #option strings self.LOOP_PERIOD = 'loopperiod' self.SERVICES = 'buffers'
def __init__(self, targetClass=None): if not targetClass: targetClass = ExpAvg Builder.__init__(self, targetClass) self.sectionName = 'Predictor' #option strings self.ALPHA = 'alpha'
def __init__(self): Builder.__init__(self, RequestBuffer) #option strings self.URLS = 'urls'
def __init__(self, targetClass=None): if not targetClass: targetClass = Cluster Builder.__init__(self, targetClass) #option strings self.SERVERS = 'servers'
def __init__(self, targetClass=None): if not targetClass: targetClass = DVFSController Builder.__init__(self, targetClass)
def __init__(self, targetClass=None): if not targetClass: targetClass = PowerMonitor Builder.__init__(self, targetClass) self.sectionName = PowerMonitor.__name__ # options: self.LOOP_PERIOD = 'loopperiod'
def build(self, cr, *args): exp = Builder.buildObject(self, cr, 'Experiment', []) return exp
def __init__(self, targetClass=None): Builder.__init__(self, Experiment)
def __init__(self, targetClass=None): if not targetClass: targetClass = KalmanFilter Builder.__init__(self, targetClass) self.sectionName = 'Predictor'
def __init__(self): Builder.__init__(self, XMLRPCProxy) #option strings self.HOST = 'host' self.PORT = 'port'