Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Webb Scales <[email protected]>
Signed-off-by: Dustin Black <[email protected]>
  • Loading branch information
dustinblack and webbnh authored Nov 11, 2024
1 parent f7ea353 commit 3552dd0
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions arcaflow_plugin_rtla/rtla_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def run_timerlat(
stats_per_col = []
found_all = False

re_isunit = re.compile(r"^# Time unit is (.+) .*$")
re_isunit = re.compile(r"# Time unit is (\w+)")
re_isindex = re.compile(r"^Index")
re_isdigit = re.compile(r"^\d")
re_isall = re.compile(r"^ALL")
Expand All @@ -157,13 +157,9 @@ def run_timerlat(
line.split()[0] in stats_names and not found_all
):
# Capture the columnar data
line_list = []
for element in line.split():
try:
line_list.append(int(element))
except ValueError:
line_list.append(element)
row_obj = dict(zip(col_headers, line_list))
items = line.split()
row_obj = dict(zip(col_headers, map(int, items[1:])))
row_obj[col_headers[0]] = items[0][:-1]
if re_isdigit.match(line):
latency_hist.append(row_obj)
else:
Expand Down

0 comments on commit 3552dd0

Please sign in to comment.