Exemplo n.º 1
0
def perf(cfgs):

    avg_perfs = []

    for k, testruns in enumerate(cfgs):
        avg_perfs.append([None, None, None])
        if len(testruns) > 0:
            ticks, testset = None, None
            results = []
            for filename in testruns:
                data = datafile.load_test(filename)
                assert ticks is None or ticks == data['ticks']
                assert testset is None or testset == data['testset']
                ticks = data['ticks']
                testset = data['testset']
                results.append(data['averages'])

            avg = np.average(results, axis=0)
            std = np.std(results, axis=0)
            avg_perfs[k] = [ticks, avg, std]

    return testset, avg_perfs
Exemplo n.º 2
0
def perf(cfgs):

    avg_perfs = []

    for k, testruns in enumerate(cfgs):
        avg_perfs.append([None, None, None])
        if len(testruns) > 0:
            ticks, testset = None, None
            results = []
            for filename in testruns:
                data = datafile.load_test(filename)
                assert ticks is None or ticks == data['ticks']
                assert testset is None or testset == data['testset']
                ticks = data['ticks']
                testset = data['testset']
                results.append(data['averages'])

            avg = np.average(results, axis = 0)
            std = np.std(results, axis = 0)
            avg_perfs[k] = [ticks, avg, std]

    return testset, avg_perfs
Exemplo n.º 3
0
import os, sys
import env
from runs import datafile

datadir, filename = os.path.split(sys.argv[1])
datadir = os.path.expanduser(datadir)
test = datafile.load_test(filename, datadir)

print test.keys()
print len(test['testset'])
print test['testset']
#print test['averages']