Skip to content

Commit e44ea71

Browse files
author
Shane Snyder
committed
generate module overview table for DAOS
also, cleanup file/object terminology in job summary
1 parent 24b1891 commit e44ea71

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

darshan-util/pydarshan/darshan/backend/cffi_backend.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@
7070
"APXC",
7171
"APMPI",
7272
"HEATMAP",
73+
"DFS",
74+
"DAOS",
7375
]
7476
def mod_name_to_idx(mod_name):
7577
return _mod_names.index(mod_name)

darshan-util/pydarshan/darshan/cli/summary.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ def register_figures(self):
508508
sect_title = f"Per-Module Statistics: {mod}"
509509

510510
try:
511-
if mod in ["POSIX", "MPI-IO", "STDIO"]:
511+
if mod in ["POSIX", "MPI-IO", "STDIO", "DFS", "DAOS"]:
512512
# get the module's record dataframe and then pass to
513513
# Darshan accumulator interface to generate a cumulative
514514
# record and derived metrics
@@ -526,9 +526,10 @@ def register_figures(self):
526526
fig_grid_area="overview")
527527
self.figures.append(mod_overview_fig)
528528

529+
data_type = "File" if mod != "DAOS" else "Object"
529530
file_count_summary_fig = ReportFigure(
530531
section_title=sect_title,
531-
fig_title=f"File Count Summary <br> (estimated by {mod} I/O access offsets)",
532+
fig_title=f"{data_type} Count Summary <br> (estimated by {mod} I/O access offsets)",
532533
fig_func=log_file_count_summary_table,
533534
fig_args=dict(derived_metrics=acc.derived_metrics,
534535
mod_name=mod),

darshan-util/pydarshan/darshan/lib/accum.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,19 @@
1010

1111
def log_file_count_summary_table(derived_metrics,
1212
mod_name: str):
13+
data_type = "files" if mod_name != "DAOS" else "objects"
1314
# the darshan_file_category enum is not really
1415
# exposed in CFFI/Python layer, so we effectively
1516
# re-export the content indices we need here
1617
# so that we can properly index the C-level data
17-
darshan_file_category = {"total files":0,
18-
"read-only files":1,
19-
"write-only files":2,
20-
"read/write files":3}
18+
darshan_file_category = {f"total {data_type}":0,
19+
f"read-only {data_type}":1,
20+
f"write-only {data_type}":2,
21+
f"read/write {data_type}":3}
2122
df = pd.DataFrame.from_dict(darshan_file_category, orient="index")
2223
df.rename(columns={0:"index"}, inplace=True)
2324
df.index.rename('type', inplace=True)
24-
df["number of files"] = np.zeros(4, dtype=int)
25+
df[f"number of {data_type}"] = np.zeros(4, dtype=int)
2526
df["avg. size"] = np.zeros(4, dtype=str)
2627
df["max size"] = np.zeros(4, dtype=str)
2728

@@ -59,9 +60,10 @@ def log_module_overview_table(derived_metrics,
5960
mod_overview = []
6061
total_cat = derived_metrics.category_counters[0]
6162

62-
total_files = total_cat.count
63-
indices = ["files accessed", "bytes read", "bytes written", "I/O performance estimate"]
64-
mod_overview.append(f"{total_files}")
63+
total_count = total_cat.count
64+
data_type = "files" if mod_name != "DAOS" else "objects"
65+
indices = [f"{data_type} accessed", "bytes read", "bytes written", "I/O performance estimate"]
66+
mod_overview.append(f"{total_count}")
6567
total_bytes_read = total_cat.total_read_volume_bytes
6668
total_bytes_read_str = humanize.naturalsize(total_bytes_read, binary=True, format="%.2f")
6769
total_bytes_written = total_cat.total_write_volume_bytes

0 commit comments

Comments
 (0)