From d0942b7aa56f7d1b9e4978e80e9f3aae628b81f9 Mon Sep 17 00:00:00 2001 From: VirajP1002 Date: Wed, 21 Aug 2024 09:12:25 +0100 Subject: [PATCH] Address comments --- scripts/benchmark_stats.py | 8 ++++---- scripts/visualise_results.py | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/benchmark_stats.py b/scripts/benchmark_stats.py index 44a9093..e083def 100644 --- a/scripts/benchmark_stats.py +++ b/scripts/benchmark_stats.py @@ -58,11 +58,11 @@ def __str__(self): f"Percentile Averages:\n" f"{formatted_percentiles}\n" f"---\n" - f"GETs (99th): {formatted_metrics.get('average_get')}\n" - f"POSTs (99th): {formatted_metrics.get('average_post')}\n" + f"GETs (99th): {formatted_metrics['average_get']}\n" + f"POSTs (99th): {formatted_metrics['average_post']}\n" f"---\n" - f"PDF: {formatted_metrics.get('pdf_percentile')}\n" - f"Session: {formatted_metrics.get('session_percentile')}\n" + f"PDF: {formatted_metrics['pdf_percentile']}\n" + f"Session: {formatted_metrics['session_percentile']}\n" f"---\n" f"Total Requests: {self.total_requests:,}\n" f"Total Failures: {self._total_failures:,}\n" diff --git a/scripts/visualise_results.py b/scripts/visualise_results.py index bd9f937..bff4450 100644 --- a/scripts/visualise_results.py +++ b/scripts/visualise_results.py @@ -20,6 +20,11 @@ def plot_data(dataframes, number_of_days_to_plot): fig, axes = plt.subplots(nrows=1, ncols=2, figsize=(15, 6)) for i in range(len(dataframes)): + """ + We use the .subplot() method below to switch the indexes of the plots themselves, + if we do not switch plots or remove this method, the visuals (such as the graph background) + and, most importantly, the axes values will only be applied to the second subplot. + """ plt.subplot(1, 2, i + 1) if ( number_of_days_to_plot and number_of_days_to_plot <= 45