Performance: show total time as part if the title

- Related to #4503.
This commit is contained in:
Hans Pabst 2025-10-22 16:30:53 +02:00
parent b31c023c7b
commit f5d0261ccb

View file

@ -26,10 +26,10 @@ def main():
routines.remove("total")
routines.sort(reverse=True, key=lambda r: timings[0].get(r, 0.0))
for titel, plot, timing in zip(titles, plots, timings):
for title, plot, timing in zip(titles, plots, timings):
timing["rest"] = timing["total"] - sum([timing.get(r, 0.0) for r in routines])
full_title = f"Timings of {titel}"
full_title = f"{title}: {timings['total']} s"
print(f'Plot: name="{plot}", title="{full_title}", ylabel="time [s]"')
for r in ["rest"] + routines:
t = timing.get(r, 0.0)