When load testing Httpbeast and its new request id, I noticed a difference
between the number of requests generated by wrk (same results with hey/oha) and
the last id generated by Httpbeast.
You can test a similar issue with the current Httpbeast release (v0.4.1) and
this short `helloHttp.nim` file...
import options, asyncdispatch
import httpbeast
var count: int
proc onRequest(req: Request): Future[void] =
block display_requests_count:
count += 1
echo count
if req.httpMethod == some(HttpGet):
case req.path.get()
of "/":
req.send("Hello World")
else:
req.send(Http404)
run(onRequest)
Run
...compiled with `nim c -r --mm:orc --threads:off -d:release helloHttp.nim`
(Nim 1.6.12).
With `wrk -c500 -d10s -t6 http://127.0.0.1:8080`, I get 1.307.459 requests on
my laptop, but the httpbeast counter is 1.307.952.
The difference is not huge, but still.
Does someone have any idea how to investigate this issue?