Skip to content

Commit

Permalink
Throw more helpful warning on missing csv in analyze mode (#313)
Browse files Browse the repository at this point in the history
Signed-off-by: colramos-amd <[email protected]>
  • Loading branch information
coleramos425 committed Apr 1, 2024
1 parent dfbe92b commit 5a2e9a8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/utils/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,9 @@ def load_kernel_top(workload, dir):
if file.exists():
tmp[id] = pd.read_csv(file)
else:
console_warning("Issue loading top kernels. Check pmc_kernel_top.csv")
console_warning(
f"Couldn't load {file.name}. This may result in missing analysis data."
)
# NB: Special case for sysinfo. Probably room for improvement in this whole function design
elif "from_csv_columnwise" in df.columns and id == 101:
tmp[id] = workload.sys_info.transpose()
Expand All @@ -946,7 +948,9 @@ def load_kernel_top(workload, dir):
# so tty could detect them and show them correctly in comparison.
tmp[id].columns = ["Info"]
else:
console_warning("Issue loading top kernels. Check pmc_kernel_top.csv")
console_warning(
f"Couldn't load {file.name}. This may result in missing analysis data."
)
workload.dfs.update(tmp)


Expand Down

0 comments on commit 5a2e9a8

Please sign in to comment.