Use results consistently

This commit is contained in:
Tim Kientzle
2022-11-05 13:29:52 -07:00
parent b8e023ad53
commit e1ab70a4b0

View File

@@ -269,7 +269,7 @@ def test_performance(
log("")
report_title = "Performance ({}): -{}".format(arch, opt_level)
return report_results(
report_title, None, None, threshold * 1.4, output_file, *results
report_title, threshold * 1.4, output_file, *results
)
@@ -301,8 +301,10 @@ def report_code_size(opt_level, old_dir, new_dir, architecture, platform, output
new_lines += result_line(newsize)
idx += 1
old_results = LogParser.results_from_string(old_lines)
new_results = LogParser.results_from_string(new_lines)
return report_results(
"Code size: -" + opt_level, old_lines, new_lines, 0.01, output_file
"Code size: -" + opt_level, 0.01, output_file, old_results, new_results
)
@@ -318,16 +320,11 @@ def get_codesize(filename):
def report_results(
title,
old_lines,
new_lines,
threshold,
output_file,
old_results=None,
new_results=None,
old_results,
new_results,
):
old_results = old_results or LogParser.results_from_string(old_lines)
new_results = new_results or LogParser.results_from_string(new_lines)
print("------- " + title + " -------")
print(create_report(old_results, new_results, threshold, "git"))