(f)
| 297 | return |
| 298 | |
| 299 | def generate(f): |
| 300 | print("Grouped by workload:", file=f) |
| 301 | two_level_summary(df, groupby_workload, groupby_environment, f) |
| 302 | |
| 303 | print("Grouped by environment:", file=f) |
| 304 | two_level_summary(df, groupby_environment, groupby_workload, f, print_total=True) |
| 305 | |
| 306 | print("Grouped by benchmark:", file=f) |
| 307 | summary_by_benchmark(df, f) |
| 308 | |
| 309 | if isinstance(file, (str, Path)): |
| 310 | ensure_directory(file.parent) |