Use new router

This commit is contained in:
Ben Sarmiento
2023-11-30 22:46:29 +01:00
parent 5472f7d08d
commit 0ad879066e
13 changed files with 311 additions and 384 deletions

View File

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