profile plots: ignore missing svg files

This commit is contained in:
Pascal Engélibert 2025-12-05 15:09:48 +01:00
commit 68435037e7

View file

@ -182,7 +182,11 @@ def make_profile_plot(logs, exp, criterion, side, record, no_flamegraph=False, m
svg_filename = log["prof"] + ".svg" svg_filename = log["prof"] + ".svg"
if not no_flamegraph: if not no_flamegraph:
os.system("flamegraph --perfdata {} -o {}".format(log["prof"], svg_filename)) os.system("flamegraph --perfdata {} -o {}".format(log["prof"], svg_filename))
profile_results = profile.extract_from_file(svg_filename) try:
profile_results = profile.extract_from_file(svg_filename)
except FileNotFoundError:
print(f"Cannot read {svg_filename}")
return
print(profile_results) print(profile_results)
for function in profile_results: for function in profile_results:
if function not in functions: if function not in functions: