Skip to content

Commit

Permalink
Fix evaluation script
Browse files Browse the repository at this point in the history
  • Loading branch information
nadia-polikarpova committed Oct 16, 2018
1 parent 0cd6905 commit b73773a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ def test_variants():
f.write(lines[0].rstrip() + ' ' + var_option(var) + '\n' + lines[1])
else:
# no config line, create one
f.write('#. this ' + var_option(var) + '\n' + content)
f.write('#. ' + var_option(var) + '\n' + content)

run_benchmark(testFileName) # Run variant
run_benchmark(varFileName) # Run variant

def clean_variants():
'''Remove previously generated benchmark variants'''
Expand Down Expand Up @@ -178,13 +178,13 @@ def write_stats():
stats.write(row)


def store_result(name, time, spec_size, code_size, variant = 'none'):
def store_result(name, time, spec_size, code_size, variant = 'all'):
timeOrTO = -1.0 if code_size == 'FAIL' else time

if not(name in results):
results[name] = SynthesisResult(name, timeOrTO, spec_size, code_size)

if variant == 'none':
if variant == 'all':
results[name].time = timeOrTO
results[name].code_size = code_size
else:
Expand All @@ -204,12 +204,12 @@ def cmdline():
os.remove(RESULTS)

if cl_opts.unopt:
variants = [VARIANTS]
variants = VARIANTS
else:
variants = []

if cl_opts.tiny:
groups = ALL_BENCHMARKS[0:2]
groups = ALL_BENCHMARKS[0:1]
else:
groups = ALL_BENCHMARKS

Expand Down

0 comments on commit b73773a

Please sign in to comment.