Skip to content

Commit

Permalink
[GR-29460] Add forknums for startup and warmup benchmark output lines.
Browse files Browse the repository at this point in the history
PullRequest: graal/8326
  • Loading branch information
fmorcos committed Feb 23, 2021
2 parents 1b92af4 + b1d391b commit 9d50d86
Showing 1 changed file with 37 additions and 10 deletions.
47 changes: 37 additions & 10 deletions sulong/mx.sulong/mx_sulong_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,21 +359,48 @@ def _filter_properties(args):

# Prepending the summary lines by the run number
ret_code, out, vm_dims = result
newResult = ""
forkNum1 = 0
forkNum2 = 0
new_result = ""

# "forknums"
first_20_warmup_iters_runs = 0
last_10_iters_runs = 0
pure_startup_runs = 0
startup_runs = 0
early_warmup_runs = 0
late_warmup_runs = 0

def make_runs_line(runs, line):
return "run " + str(runs) + " " + line + "\n"

for line in out.splitlines():
if line.startswith("first"):
newResult += "run " + str(forkNum1) + " " + line + "\n"
forkNum1 += 1
new_result += make_runs_line(first_20_warmup_iters_runs, line)
first_20_warmup_iters_runs += 1
continue
elif line.startswith("last"):
new_result += make_runs_line(last_10_iters_runs, line)
last_10_iters_runs += 1
continue
if line.startswith("last"):
newResult += "run " + str(forkNum2) + " " + line + "\n"
forkNum2 += 1
elif line.startswith("Pure-startup"):
new_result += make_runs_line(pure_startup_runs, line)
pure_startup_runs += 1
continue
newResult += line + "\n"
elif line.startswith("Startup"):
new_result += make_runs_line(startup_runs, line)
startup_runs += 1
continue
elif line.startswith("Early-warmup"):
new_result += make_runs_line(early_warmup_runs, line)
early_warmup_runs += 1
continue
elif line.startswith("Late-warmup"):
new_result += make_runs_line(late_warmup_runs, line)
late_warmup_runs += 1
continue

new_result += line + "\n"

return ret_code, newResult, vm_dims
return ret_code, new_result, vm_dims

def prepare_env(self, env):
# if hasattr(self.host_vm(), 'run_launcher'):
Expand Down

0 comments on commit 9d50d86

Please sign in to comment.