Use new router
This commit is contained in:
6
bench.py
6
bench.py
@@ -14,14 +14,14 @@ async def extract_links(url):
|
||||
|
||||
async def benchmark(url):
|
||||
# This will still block, because subprocess.run is not async
|
||||
subprocess.run(['hey', '-n', '10000', '-c', '50', url])
|
||||
subprocess.run(['hey', '-n', '1000', '-c', '10', url])
|
||||
|
||||
url = 'http://localhost:9999/http/'
|
||||
|
||||
async def main():
|
||||
async for link in extract_links(url):
|
||||
print("BENCHMARKING " + link.replace('/http/', '/'))
|
||||
await benchmark(link.replace('/http/', '/'))
|
||||
print("BENCHMARKING " + link.replace('/http/', '/dav/'))
|
||||
await benchmark(link.replace('/http/', '/dav/'))
|
||||
|
||||
print("BENCHMARKING " + link)
|
||||
await benchmark(link)
|
||||
|
||||
Reference in New Issue
Block a user