First pass at http benchmark.

This commit is contained in:
Ryan Dahl 2018-10-15 16:44:35 -04:00
parent 62962e71fe
commit c61a0f2f84
11 changed files with 154 additions and 1 deletions

View file

@ -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