From c61a0f2f84e619a70704b59fd72cd7da863d4461 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 15 Oct 2018 16:44:35 -0400 Subject: First pass at http benchmark. --- tools/util.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tools/util.py') diff --git a/tools/util.py b/tools/util.py index 2620e706f..10b6b9c6f 100644 --- a/tools/util.py +++ b/tools/util.py @@ -324,3 +324,11 @@ def extract_number(pattern, string): if len(matches) != 1: return None return int(matches[0]) + + +def parse_wrk_output(output): + req_per_sec = None + for line in output.split("\n"): + if req_per_sec is None: + req_per_sec = extract_number(r'Requests/sec:\s+(\d+)', line) + return req_per_sec -- cgit v1.2.3