コード例 #1
0
ファイル: measure_example.py プロジェクト: dc-uba/metrika
def configure(engine):
    suite = Suite()
    suite.add_variable_from_dict("program", programs)
    suite.add_variable_from_dict("size", sizes)

    setup = engine.organize_experiment(suite, "join-perf")
    setup.invoke_with_command(lambda program, size: 'python -c "%s"' % (program % size))
    setup.measure_execution_time()
コード例 #2
0
def game_suites():
    with open('configuration.yml', 'r') as f:
        config = yaml.load(f)

    benchs = config["benchs"]
    implementations = config["implementations"]

    suites = []
    for name, inputs in benchs.items():
        suite = Suite(name)
        suite.add_variable_from_dict('input', inputs)
        var = suite.add_variable_from_dict('implementation', implementations)
        #var.add_variable_from_list('variation', lambda impl: variations_of_for(name, impl))
        suites.append(suite)

    return suites
コード例 #3
0
def game_suites():
    with open('configuration.yml', 'r') as f:
        config = yaml.load(f)

    benchs = config["benchs"]
    implementations = config["implementations"]

    suites = []
    for name, inputs in benchs.items():
        suite = Suite(name)
        suite.add_variable_from_dict('input', inputs)
        var = suite.add_variable_from_dict('implementation', implementations)
        #var.add_variable_from_list('variation', lambda impl: variations_of_for(name, impl))
        suites.append(suite)

    return suites
コード例 #4
0
ファイル: measure_example.py プロジェクト: dc-uba/metrika
def configure(engine):
    suite = Suite()
    suite.add_variable_from_dict('program', programs)
    suite.add_variable_from_dict('size', sizes)

    setup = engine.organize_experiment(suite, 'join-perf')
    setup.invoke_with_command(lambda program, size: 'python -c "%s"' %
                              (program % size))
    setup.measure_execution_time()