Add log when response is generated from scratch
This commit is contained in:
6
bench.py
6
bench.py
@@ -14,7 +14,7 @@ async def extract_links(url):
|
||||
|
||||
async def benchmark(url):
|
||||
# This will still block, because subprocess.run is not async
|
||||
subprocess.run(['hey', '-n', '100000', '-c', '100', url])
|
||||
subprocess.run(['hey', '-n', '10000', '-c', '50', url])
|
||||
|
||||
url = 'http://localhost:9999/http/'
|
||||
|
||||
@@ -25,7 +25,9 @@ async def main():
|
||||
|
||||
print("BENCHMARKING " + link)
|
||||
await benchmark(link)
|
||||
|
||||
async for inl in extract_links(link):
|
||||
print("BENCHMARKING " + inl)
|
||||
await benchmark(inl)
|
||||
|
||||
# Python 3.7+
|
||||
asyncio.run(main())
|
||||
|
||||
Reference in New Issue
Block a user