Skip to content

Commit 41ed287

Browse files
authored
Merge pull request #347 from LLNL/bugfix/hist_times
Fix bug in gathering historical timing data
2 parents 050d0c6 + fb654c9 commit 41ed287

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

scripts/devtools/performance_analysis.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,6 @@ def get_hist_times(test_name, bench_path, cluster, region):
162162
if (not hist_cali_files):
163163
raise Exception(f"No {test_name}_*.cali files found for {cluster}")
164164
hist_data = th.Thicket.from_caliperreader(hist_cali_files, disable_tqdm=True)
165-
query = th.query.Query().match("+", lambda row: not row[row["name"] == region].empty)
166-
hist_data = hist_data.query(query)
167165
test_group = ["install_config"]
168166
test_dict = hist_data.groupby(test_group)
169167
return test_dict

scripts/lc/plot_hist_data.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,21 +101,26 @@ def plot_hist_times(test_name, bench, clusters, region, metric, savefile=None):
101101
# Retrieve all test names from benchmark file names
102102
all_files = glob.glob(os.path.join(bench, "**/*.cali"), recursive=True)
103103
test_names = set(os.path.basename(x).split("_")[0] for x in all_files)
104+
plot_images = {}
104105
for test in test_names:
105106
if (test not in disp_tests):
106107
continue
107108
print(f"Getting data for {test}")
109+
pfile = f"{test}.png"
110+
plot_file = os.path.join(out_dir, pfile)
111+
plot_hist_times(test, bench, cluster_names, region, metric, savefile=plot_file)
112+
plot_images.update({test: pfile})
113+
114+
plot_images = dict(sorted(plot_images.items()))
115+
for test, pfile in plot_images.items():
108116
indx_file += f"""
109117
.. dropdown:: {test}
110118
111119
"""
112-
pfile = f"{test}.png"
113-
plot_file = os.path.join(out_dir, pfile)
114120
indx_file += f"""
115121
.. image:: {pfile}
116122
117123
"""
118-
plot_hist_times(test, bench, cluster_names, region, metric, savefile=plot_file)
119124

120125
with open(os.path.join(out_dir, "index.rst"), "w") as f:
121126
f.write(indx_file)

0 commit comments

Comments
 (0)