Commit 8b6cd6e5 authored by Joachim Breitner's avatar Joachim Breitner
Browse files

Include test case name in performance result

With THREADS=n, for n > 1, it becomes impossible to match the
performance numbers to the test case name. Hence include it in the
output. This also makes grepping through a bunch of logs for a specific
test case much easier, and outweighs the extra verbosity.
parent ef4e8c54
...@@ -1021,12 +1021,14 @@ def multi_compile_and_run( name, way, top_mod, extra_mods, extra_hc_opts ): ...@@ -1021,12 +1021,14 @@ def multi_compile_and_run( name, way, top_mod, extra_mods, extra_hc_opts ):
def stats( name, way, stats_file ): def stats( name, way, stats_file ):
opts = getTestOpts() opts = getTestOpts()
return checkStats(stats_file, opts.stats_range_fields) return checkStats(name, way, stats_file, opts.stats_range_fields)
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Check -t stats info # Check -t stats info
def checkStats(stats_file, range_fields): def checkStats(name, way, stats_file, range_fields):
full_name = name + '(' + way + ')'
result = passed() result = passed()
if len(range_fields) > 0: if len(range_fields) > 0:
f = open(in_testdir(stats_file)) f = open(in_testdir(stats_file))
...@@ -1062,12 +1064,12 @@ def checkStats(stats_file, range_fields): ...@@ -1062,12 +1064,12 @@ def checkStats(stats_file, range_fields):
length = max(map (lambda x : len(str(x)), [expected, lowerBound, upperBound, val])) length = max(map (lambda x : len(str(x)), [expected, lowerBound, upperBound, val]))
def display(descr, val, extra): def display(descr, val, extra):
print descr, string.rjust(str(val), length), extra print descr, string.rjust(str(val), length), extra
display(' Expected ' + field + ':', expected, '+/-' + str(dev) + '%') display(' Expected ' + full_name + ' ' + field + ':', expected, '+/-' + str(dev) + '%')
display(' Lower bound ' + field + ':', lowerBound, '') display(' Lower bound ' + full_name + ' ' + field + ':', lowerBound, '')
display(' Upper bound ' + field + ':', upperBound, '') display(' Upper bound ' + full_name + ' ' + field + ':', upperBound, '')
display(' Actual ' + field + ':', val, '') display(' Actual ' + full_name + ' ' + field + ':', val, '')
if val != expected: if val != expected:
display(' Deviation ' + field + ':', deviation, '%') display(' Deviation ' + full_name + ' ' + field + ':', deviation, '%')
return result return result
...@@ -1158,7 +1160,7 @@ def simple_build( name, way, extra_hc_opts, should_fail, top_mod, link, addsuf, ...@@ -1158,7 +1160,7 @@ def simple_build( name, way, extra_hc_opts, should_fail, top_mod, link, addsuf,
# ToDo: if the sub-shell was killed by ^C, then exit # ToDo: if the sub-shell was killed by ^C, then exit
statsResult = checkStats(stats_file, opts.compiler_stats_range_fields) statsResult = checkStats(name, way, stats_file, opts.compiler_stats_range_fields)
if badResult(statsResult): if badResult(statsResult):
return statsResult return statsResult
...@@ -1258,7 +1260,7 @@ def simple_run( name, way, prog, args ): ...@@ -1258,7 +1260,7 @@ def simple_run( name, way, prog, args ):
if check_prof and not check_prof_ok(name): if check_prof and not check_prof_ok(name):
return failBecause('bad profile') return failBecause('bad profile')
return checkStats(stats_file, opts.stats_range_fields) return checkStats(name, way, stats_file, opts.stats_range_fields)
def rts_flags(way): def rts_flags(way):
if (way == ''): if (way == ''):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment