From f47b8d2547e6486caefcbfb1d1f07b9dcfc4c204 Mon Sep 17 00:00:00 2001 From: colramos-amd Date: Fri, 22 Mar 2024 16:34:20 -0500 Subject: [PATCH] Throw more helpful warning on missing csv in analyze mode (#313) Signed-off-by: colramos-amd --- src/utils/parser.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/utils/parser.py b/src/utils/parser.py index e8976f325b..5ca591eaae 100644 --- a/src/utils/parser.py +++ b/src/utils/parser.py @@ -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() @@ -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)