Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion darshan-util/pydarshan/darshan/cli/file_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,10 @@ def rich_print(df, mod, order_by):
# calculate totals to plug in to table footer
all_time_by_slowest = df["time_by_slowest"].sum()
all_total_bytes = df["total_bytes"].sum()
all_perf_by_slowest = all_total_bytes / all_time_by_slowest
if all_total_bytes == 0:
all_perf_by_slowest = 0
else:
all_perf_by_slowest = all_total_bytes / all_time_by_slowest
all_bytes_read = df["bytes_read"].sum()
all_bytes_written = df["bytes_written"].sum()
all_reads = df["reads"].sum()
Expand Down
5 changes: 4 additions & 1 deletion darshan-util/pydarshan/darshan/cli/job_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ def rich_print(df, mod, order_by):
all_time_by_slowest = df['time_by_slowest'].sum()
all_total_bytes = df['total_bytes'].sum()
all_total_files = df['total_files'].sum()
all_perf_by_slowest = all_total_bytes / all_time_by_slowest
if all_total_bytes == 0:
all_perf_by_slowest = 0
else:
all_perf_by_slowest = all_total_bytes / all_time_by_slowest

# instantiate a rich table and pretty print the dataframe
console = Console()
Expand Down
Loading