def main(): parser = ArgumentParser(description="Schedule Cloud9 experiments.") parser.add_argument("hosts", help="Avaliable cluster machines") parser.add_argument("cmdlines", help="Command lines of the testing targets") parser.add_argument("workercount", type=int, nargs="+", help="Worker counts") parser.add_argument("-c", help="Filter command lines using the specified file") parser.add_argument("-m", action="append", help="Schedule only on the specificed machines") args = parser.parse_args() hosts, localhost = readHosts(args.hosts) cmdlines = readCmdlines(args.cmdlines) cmdFilter = None if args.c: f = open(args.c, "r") cmdFilter = f.read().split() f.close() printSchedule(hosts, cmdlines, args.workercount, cmdFilter=cmdFilter, hostsFilter=args.m)
def __init__(self, hostsName, hfilter=None): self.hosts, self.localhost = readHosts(hostsName) self.hfilter = set(hfilter) if hfilter else None self.pathRe = re.compile(r"^./([^/]+)/([^/-]+)-(\d+)(-(\d+))?/out-lb.txt$") self.totalRe = re.compile(r"^\[([\d.]+)\].*\[(\d+)\] IN TOTAL$") self.transferRe = re.compile(r"\[([\d.]+)\].*from (\d+) to (\d+) for (\d+) states$")
def __init__(self, hostsName, hfilter=None, ffilter=None, targetcov=None): self.hosts, self.localhost = readHosts(hostsName) self.hfilter = set(hfilter) if hfilter else None self.ffilter = set(ffilter) if ffilter else None self.targetcov = targetcov self.pathRe = re.compile(r"^./([^/]+)/([^/-]+)-(\d+)(-(\d+))?/worker-(\d+)/c9-coverage.txt$") self.covDataRe = re.compile(r"^\d+/\d+\(([0-9.]+)\)$")
def __init__(self, hostsName, hfilter=None): self.hosts, self.localhost = readHosts(hostsName) self.hfilter = set(hfilter) if hfilter else None self.pathRe = re.compile( r"^./([^/]+)/([^/-]+)-(\d+)(-(\d+))?/out-lb.txt$") self.totalRe = re.compile(r"^\[([\d.]+)\].*\[(\d+)\] IN TOTAL$") self.transferRe = re.compile( r"\[([\d.]+)\].*from (\d+) to (\d+) for (\d+) states$")
def __init__(self, hostsName, cmdlinesName, expName, kleeCmdName, coverableName, uid=None, uidprefix="test", debugcomm=False, duration=DEFAULT_EXP_DURATION, balancetout=None, strategy=None, subprocKill=True, basePort=DEFAULT_BASE_PORT): self.hosts, self.localhost = readHosts(hostsName) self.cmdlines = readCmdlines(cmdlinesName) self.exp = readExp(expName) self.kleeCmd = readKleeCmd(kleeCmdName) self.coverable = getCoverablePath(coverableName) self.uid = uid if uid else self._generateUID(uidprefix) self.debugcomm = debugcomm self.starttime = None self.duration = duration self.balancetout = balancetout self.strategy = strategy self.subprocKill = subprocKill self.basePort = basePort self._logMsg("Using experiment name: %s" % bold(self.uid)) self._logMsg("Using as localhost: %s" % self.localhost["host"])
def __init__(self, hostsName, hfilter=None): self.hosts, self.localhost = readHosts(hostsName) self.hfilter = set(hfilter) if hfilter else None self.pathRe = re.compile(r"^./([^/]+)/([^/-]+)-(\d+)(-(\d+))?/worker-(\d+)/c9-stats.txt$")