Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
VirajP1002 committed Aug 23, 2024
1 parent 39b3199 commit 3e7d911
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions scripts/benchmark_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand All @@ -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:
Expand Down

0 comments on commit 3e7d911

Please sign in to comment.