mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 04:39:10 +00:00
First pass at http benchmark.
This commit is contained in:
parent
62962e71fe
commit
c61a0f2f84
11 changed files with 154 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue