From cd567214e1f0345404ad7ad74f45e1aa0393226f Mon Sep 17 00:00:00 2001 From: Thibaut Lunet Date: Tue, 18 Jul 2023 11:26:16 +0200 Subject: [PATCH] TL: formating for runtime --- scripts/07_pararealSpeedup.py | 2 +- scripts/08_pararealFCFSpeedup.py | 2 +- web_apps/pararealFCFSchedule.py | 2 +- web_apps/pararealSchedule.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/07_pararealSpeedup.py b/scripts/07_pararealSpeedup.py index fd789a3..41cdd07 100644 --- a/scripts/07_pararealSpeedup.py +++ b/scripts/07_pararealSpeedup.py @@ -16,4 +16,4 @@ fig.show() time = parareal.getRuntime(N, K, N, schedulerType=schedulerType) -print(f"Runtime = {time}") \ No newline at end of file +print(f"Runtime = {time:.1f}") \ No newline at end of file diff --git a/scripts/08_pararealFCFSpeedup.py b/scripts/08_pararealFCFSpeedup.py index 9e81f58..411a89f 100644 --- a/scripts/08_pararealFCFSpeedup.py +++ b/scripts/08_pararealFCFSpeedup.py @@ -16,4 +16,4 @@ fig.show() time = parareal_fcf.getRuntime(N, K, N, schedulerType=schedulerType) -print(f"Runtime = {time}") +print(f"Runtime = {time:.1f}") diff --git a/web_apps/pararealFCFSchedule.py b/web_apps/pararealFCFSchedule.py index 53f0e70..eb7e242 100644 --- a/web_apps/pararealFCFSchedule.py +++ b/web_apps/pararealFCFSchedule.py @@ -132,7 +132,7 @@ def compute(self, response_data: dict[str, Any] | None) -> ResponseStages: # === Response === plot_stage = s1_plot.copy() - plot_stage.title += f" (runtime = {time})" + plot_stage.title += f" (runtime = {time:.1f})" plot_stage.plot = fig.to_json() r.add_plot_stage(plot_stage) diff --git a/web_apps/pararealSchedule.py b/web_apps/pararealSchedule.py index 64467f4..277f1d1 100644 --- a/web_apps/pararealSchedule.py +++ b/web_apps/pararealSchedule.py @@ -131,7 +131,7 @@ def compute(self, response_data: dict[str, Any] | None) -> ResponseStages: # === Response === plot_stage = s1_plot.copy() - plot_stage.title += f" (runtime = {time})" + plot_stage.title += f" (runtime = {time:.1f})" plot_stage.plot = fig.to_json() r.add_plot_stage(plot_stage)