Skip to content

Commit e1ab70a

Browse files
committed
Use results consistently
1 parent b8e023a commit e1ab70a

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

benchmark/scripts/run_smoke_bench

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def test_performance(
269269
log("")
270270
report_title = "Performance ({}): -{}".format(arch, opt_level)
271271
return report_results(
272-
report_title, None, None, threshold * 1.4, output_file, *results
272+
report_title, threshold * 1.4, output_file, *results
273273
)
274274

275275

@@ -301,8 +301,10 @@ def report_code_size(opt_level, old_dir, new_dir, architecture, platform, output
301301
new_lines += result_line(newsize)
302302
idx += 1
303303

304+
old_results = LogParser.results_from_string(old_lines)
305+
new_results = LogParser.results_from_string(new_lines)
304306
return report_results(
305-
"Code size: -" + opt_level, old_lines, new_lines, 0.01, output_file
307+
"Code size: -" + opt_level, 0.01, output_file, old_results, new_results
306308
)
307309

308310

@@ -318,16 +320,11 @@ def get_codesize(filename):
318320

319321
def report_results(
320322
title,
321-
old_lines,
322-
new_lines,
323323
threshold,
324324
output_file,
325-
old_results=None,
326-
new_results=None,
325+
old_results,
326+
new_results,
327327
):
328-
old_results = old_results or LogParser.results_from_string(old_lines)
329-
new_results = new_results or LogParser.results_from_string(new_lines)
330-
331328
print("------- " + title + " -------")
332329
print(create_report(old_results, new_results, threshold, "git"))
333330

0 commit comments

Comments
 (0)