diff --git a/bench.py b/bench.py
index c8bc227..3b08c08 100644
--- a/bench.py
+++ b/bench.py
@@ -11,20 +11,21 @@ async def extract_links(url):
for link in soup.find_all('a'):
yield urljoin(url, link.get('href'))
+
async def benchmark(url):
# This will still block, because subprocess.run is not async
- subprocess.run(['hey', '-n', '100', '-c', '10', url])
+ subprocess.run(['hey', '-n', '10000', '-c', '100', url])
-url = 'http://zen.box:9999/http/'
+url = 'http://localhost:9999/http/'
async def main():
- i = 1
async for link in extract_links(url):
- if i > 50:
- break
- await benchmark(link)
+ print("BENCHMARKING " + link.replace('/http/', '/'))
await benchmark(link.replace('/http/', '/'))
- i += 1
+
+ print("BENCHMARKING " + link)
+ await benchmark(link)
+
# Python 3.7+
asyncio.run(main())
diff --git a/internal/dav/listing.go b/internal/dav/listing.go
index fff3b54..cf6db11 100644
--- a/internal/dav/listing.go
+++ b/internal/dav/listing.go
@@ -76,7 +76,7 @@ func handleListTorrents(w http.ResponseWriter, requestPath string, t *torrent.To
}
resp, _ := t.ResponseCache.Get(basePath + ".dav")
- davDoc := "
", directory, tor.AccessKey, tor.AccessKey)
+ htmlRet += fmt.Sprintf("