by voidlogic · 9y ago · 0 comments
Say what? When I do this kind of testing using wrk:
1. I use multiple clients
2. Each client uses a thread for every logical CPU
3. I usually use at least 256 connections
What is actually being tested here? This smells like a test to get a desired result.No to mention in regards to Go/Others:
1. He is using an RC
2. By default it uses all all cores, why handicap it?
3. He didn't share his code for his contestants, how can I trust this?Which is silly considering a majority of wild browsers now support HTTP/2.
Thanks for pointing our the repo, I missed it before: https://github.com/squeaky-pl/japronto
His Go isn't horrible, but it could be written like this:
func hello(respWtr http.ResponseWriter, req *http.Request) {
text, status := []byte("Hello world!"), http.StatusOK
if request.URL.Path != "/" {
text, status = []byte("Not Found"), http.StatusNotFound
}
respWtr.WriteHeader(status)
response.Write(text)
}
Rather than: https://github.com/squeaky-pl/japronto/blob/master/benchmark...Also, limiting Go to use a single core is unfair because the Go GC is optimized for multi-core operation.