#import datetime as dt #perhaps needs to be set somewhere else Pyro4.config.HMAC_KEY='pRivAt3Key' #lists for return stressValues = [] runStartTimeList=[] runDurations = [] MALLOC_LIMIT = 4095 RESTYPE = "" import sys from collections import OrderedDict from Library import getHomepath sys.path.insert(0, getHomepath() + '/distributions/') from abstract_dist import * class dist_trapezoiddal(abstract_dist): pass def functionCount(emulationID,emulationName,emulationLifetimeID,startTimesec,duration, distributionGranularity,distributionArg,resType,HOMEPATH): global RESTYPE RESTYPE = resType startLoad = int(distributionArg["startload"]) stopLoad = int(distributionArg["stopload"]) triggerType="time" duration = float(duration)
#perhaps needs to be set somewhere else Pyro4.config.HMAC_KEY = 'pRivAt3Key' #lists for return stressValues = [] runStartTimeList = [] runDurations = [] RESTYPE = "null" MALLOC_LIMIT = 4095 import sys from collections import OrderedDict from Library import getHomepath sys.path.insert(0, getHomepath() + '/distributions/') from abstract_dist import * class dist_linear_incr(abstract_dist): pass def functionCount(emulationID, emulationName, emulationLifetimeID, startTimesec, duration, distributionGranularity, distributionArg, resType, HOMEPATH): startLoad = int(distributionArg["startload"]) stopLoad = int(distributionArg["stopload"]) triggerType = "time" # we check that the resource type is mem, if not we give malloc limit a value 1000000, because is not used for the other resource types
import Pyro4,imp,time,sys,os,psutil import sqlite3 as sqlite import datetime as dt import subprocess from signal import * from subprocess import * from collections import OrderedDict from Library import getHomepath #perhaps needs to be set somewhere else Pyro4.config.HMAC_KEY='pRivAt3Key' #Pyro4.config.SERIALIZER='pickle' try: # HOMEPATH= os.environ['COCOMA'] HOMEPATH = getHomepath() except: print "no $COCOMA environmental variable set" sys.path.insert(0, getHomepath() + '/emulators/') #Adds dir to PYTHONPATH, needed to import abstract_emu from abstract_emu import * class emulatorMod(abstract_emu): def __init__(self,emulationID,distributionID,emulationLifetimeID,resourceTypeDist,duration,emulatorArg, stressValues,runNo,emuDuration): self.emulationID = emulationID self.emulationLifetimeID = emulationLifetimeID self.duration = duration duration =float(duration) self.stressValues = stressValues self.runNo=runNo
''' import math,time,multiprocessing import Pyro4,imp,time,sys,os,psutil import sqlite3 as sqlite import datetime as dt import subprocess from signal import SIGINT from collections import OrderedDict from Library import getHomepath #perhaps needs to be set somewhere else Pyro4.config.HMAC_KEY='pRivAt3Key' try: # HOMEPATH= os.environ['COCOMA'] HOMEPATH = getHomepath() except: print "no $COCOMA environmental variable set" sys.path.insert(0, getHomepath() + '/emulators/') #Adds dir to PYTHONPATH, needed to import abstract_emu from abstract_emu import * class emulatorMod(abstract_emu): def __init__(self,emulationID,distributionID,emulationLifetimeID,resourceTypeDist,duration,emulatorArg, stressValues,runNo,emuDuration): self.emulationID = emulationID self.emulationLifetimeID = emulationLifetimeID self.duration = duration duration =float(duration) self.stressValues = stressValues
''' import math, time, multiprocessing import Pyro4, imp, time, sys, os, psutil import sqlite3 as sqlite import datetime as dt import subprocess from signal import SIGINT from collections import OrderedDict from Library import getHomepath #perhaps needs to be set somewhere else Pyro4.config.HMAC_KEY = 'pRivAt3Key' try: # HOMEPATH= os.environ['COCOMA'] HOMEPATH = getHomepath() except: print "no $COCOMA environmental variable set" sys.path.insert( 0, getHomepath() + '/emulators/') #Adds dir to PYTHONPATH, needed to import abstract_emu from abstract_emu import * class emulatorMod(abstract_emu): def __init__(self, emulationID, distributionID, emulationLifetimeID, resourceTypeDist, duration, emulatorArg, stressValues, runNo, emuDuration): self.emulationID = emulationID