コード例 #1
0
def runBenchmark(outdir, experiment):
    Aim.sepservers0 = ['euler10', 'euler11']
    Aim.sepservers1 = []
    srvObserver = Observer('AIM server started')
    storageClients = []

    ## start storages
    storageClients = startStorage()
    print "Storage started"
    
    # Populate
    outfile = "{}/{}_population.db".format(outdir, sqliteOut(False))
    aimObserver = Observer("AIM")
    aimClients = startAimServers([aimObserver])
    #aimObserver.waitFor(len(Aim.sepservers0) + len(Aim.sepservers1) + len(Aim.rtaservers0) + len(Aim.rtaservers1))
    time.sleep(2)
    populationClient = startSepClient(True, outfile)
    populationClient.join()
    experiment()
    for aimClient in aimClients:
        aimClient.kill()
        aimClient.join()
    for client in storageClients:
        client.kill()
    for client in storageClients:
        client.join()
コード例 #2
0
def runBenchmark(outdir, experiment):
    Aim.sepservers0 = ['euler10', 'euler11']
    Aim.sepservers1 = []
    srvObserver = Observer('AIM server started')
    storageClients = []

    ## start storages
    storageClients = startStorage()
    print "Storage started"

    # Populate
    outfile = "{}/{}_population.db".format(outdir, sqliteOut(False))
    aimObserver = Observer("AIM")
    aimClients = startAimServers([aimObserver])
    #aimObserver.waitFor(len(Aim.sepservers0) + len(Aim.sepservers1) + len(Aim.rtaservers0) + len(Aim.rtaservers1))
    time.sleep(2)
    populationClient = startSepClient(True, outfile)
    populationClient.join()
    experiment()
    for aimClient in aimClients:
        aimClient.kill()
        aimClient.join()
    for client in storageClients:
        client.kill()
    for client in storageClients:
        client.join()
コード例 #3
0
def experiment2(outdir):
    odir = "{}/experiment2".format(outdir)
    if not os.path.isdir(odir):
        os.mkdir(odir)
    out = "{}/{}.db".format(odir, sqliteOut(True))
    sepOut = "{}/{}_sep.csv".format(odir, sqliteOut(True))
    rtaClient = startRtaClient(out)
    sepClient = startSepClient(False, sepOut)
    rtaClient.join()
    sepClient.join()
コード例 #4
0
def experiment2(outdir):
    odir = "{}/experiment2".format(outdir)
    if not os.path.isdir(odir):
        os.mkdir(odir)
    out = "{}/{}.db".format(odir, sqliteOut(True))
    sepOut = "{}/{}_sep.csv".format(odir, sqliteOut(True))
    rtaClient = startRtaClient(out)
    sepClient = startSepClient(False, sepOut)
    rtaClient.join()
    sepClient.join()