Пример #1
0
 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'
Пример #2
0
 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'
Пример #3
0
 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'
Пример #4
0
 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'
Пример #5
0
 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'
Пример #6
0
 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'
Пример #7
0
 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'
Пример #8
0
 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'
Пример #9
0
 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'
Пример #10
0
    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
Пример #11
0
 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
Пример #12
0
    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
Пример #13
0
 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
Пример #14
0
 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)
Пример #15
0
 def __init__(self, targetClass=None):
     if not targetClass: targetClass = LoadBalancer
     Builder.__init__(self, targetClass)
Пример #16
0
 def __init__(self):
     Builder.__init__(self, ResourceMonitor)
     self.PORT = 'port'
     self.HOST = 'host'   
Пример #17
0
 def __init__(self):
     Builder.__init__(self, RequestMonitor)
     #option strings
     self.LOOP_PERIOD = 'loopperiod'
     self.SERVICES = 'buffers'
Пример #18
0
 def __init__(self):
     Builder.__init__(self, ResourceMonitor)
     self.PORT = 'port'
     self.HOST = 'host'
Пример #19
0
 def __init__(self, targetClass=None):
     if not targetClass: targetClass = ExpAvg
     Builder.__init__(self, targetClass)
     self.sectionName = 'Predictor'
     #option strings
     self.ALPHA = 'alpha'
Пример #20
0
 def __init__(self):
     Builder.__init__(self, RequestBuffer)
     #option strings
     self.URLS = 'urls'
Пример #21
0
 def __init__(self, targetClass=None):
     if not targetClass: targetClass = Cluster
     Builder.__init__(self, targetClass)        
     #option strings
     self.SERVERS = 'servers'
Пример #22
0
 def __init__(self, targetClass=None):
     if not targetClass: targetClass = DVFSController
     Builder.__init__(self, targetClass)
Пример #23
0
 def __init__(self, targetClass=None):
     if not targetClass: targetClass = Cluster
     Builder.__init__(self, targetClass)
     #option strings
     self.SERVERS = 'servers'
Пример #24
0
 def __init__(self, targetClass=None):
     if not targetClass: targetClass = PowerMonitor
     Builder.__init__(self, targetClass)
     self.sectionName = PowerMonitor.__name__
     # options:
     self.LOOP_PERIOD = 'loopperiod'
Пример #25
0
 def build(self, cr, *args):
     exp = Builder.buildObject(self, cr, 'Experiment', [])
     return exp
Пример #26
0
 def __init__(self, targetClass=None):        
     Builder.__init__(self, Experiment)
Пример #27
0
 def __init__(self):
     Builder.__init__(self, RequestBuffer)
     #option strings        
     self.URLS = 'urls'
Пример #28
0
 def __init__(self, targetClass=None):
     if not targetClass: targetClass = ExpAvg
     Builder.__init__(self, targetClass)
     self.sectionName = 'Predictor'
     #option strings
     self.ALPHA = 'alpha'
Пример #29
0
 def __init__(self, targetClass=None):
     if not targetClass: targetClass = KalmanFilter
     Builder.__init__(self, targetClass)
     self.sectionName = 'Predictor'        
Пример #30
0
 def __init__(self, targetClass=None):
     if not targetClass: targetClass = KalmanFilter
     Builder.__init__(self, targetClass)
     self.sectionName = 'Predictor'
Пример #31
0
 def __init__(self, targetClass=None):
     if not targetClass: targetClass = LoadBalancer
     Builder.__init__(self, targetClass)
Пример #32
0
 def __init__(self, targetClass=None):
     if not targetClass: targetClass = DVFSController
     Builder.__init__(self, targetClass)
Пример #33
0
 def __init__(self):
     Builder.__init__(self, RequestMonitor)
     #option strings
     self.LOOP_PERIOD = 'loopperiod'
     self.SERVICES = 'buffers'
Пример #34
0
 def __init__(self):
     Builder.__init__(self, XMLRPCProxy)
     #option strings
     self.HOST = 'host'
     self.PORT = 'port'