From 3e7d911bbe76960abba5bf112907699a1a7c6422 Mon Sep 17 00:00:00 2001 From: VirajP1002 Date: Fri, 23 Aug 2024 15:32:43 +0100 Subject: [PATCH] Format --- scripts/benchmark_stats.py | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/scripts/benchmark_stats.py b/scripts/benchmark_stats.py index ceb4e5f..d147ae8 100644 --- a/scripts/benchmark_stats.py +++ b/scripts/benchmark_stats.py @@ -130,9 +130,11 @@ def files(self) -> List[str]: @property def percentiles(self) -> Mapping: return { - percentile: round(float( - sum(values) / self._get_weighted_request_count(self.total_requests) - )) + percentile: round( + float( + sum(values) / self._get_weighted_request_count(self.total_requests) + ) + ) for percentile, values in self._percentiles.items() } @@ -142,17 +144,21 @@ def total_requests(self) -> int: @property def average_get(self) -> int: - return round(float( - sum(self._requests["GET"]["response_times"]) - / self._get_weighted_request_count(self._requests["GET"]["total"]) - )) + return round( + float( + sum(self._requests["GET"]["response_times"]) + / self._get_weighted_request_count(self._requests["GET"]["total"]) + ) + ) @property def average_post(self) -> int: - return round(float( - sum(self._requests["POST"]["response_times"]) - / self._get_weighted_request_count(self._requests["POST"]["total"]) - )) + return round( + float( + sum(self._requests["POST"]["response_times"]) + / self._get_weighted_request_count(self._requests["POST"]["total"]) + ) + ) @property def error_percentage(self) -> float: