summaryrefslogtreecommitdiff
path: root/benchmark/http
Commit message (Collapse)AuthorAgeFilesLines
* http: save roundtrips, convert buffers to stringsBen Noordhuis2013-05-231-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds an optimization to the HTTP client that makes it possible to: * Pack the headers and the first chunk of the request body into a single write(). * Pack the chunk header and the chunk itself into a single write(). Because only one write() system call is issued instead of several, the chances of data ending up in a single TCP packet are phenomenally higher: the benchmark with `type=buf size=32` jumps from 50 req/s to 7,500 req/s, a 150-fold increase. This commit removes the check from e4b716ef that pushes binary encoded strings into the slow path. The commit log mentions that: We were assuming that any string can be concatenated safely to CRLF. However, for hex, base64, or binary encoded writes, this is not the case, and results in sending the incorrect response. For hex and base64 strings that's certainly true but binary strings are 'das Ding an sich': string.length is the same before and after decoding. Fixes #5528.
* http: Don't hot-path end() for large buffersisaacs2013-03-141-0/+59
| | | | | | | | | | | | The benefits of the hot-path optimization below start to fall off when the buffer size gets up near 128KB, because the cost of the copy is more than the cost of the extra write() call. Switch to the write/end method at that point. Heuristics and magic numbers are awful, but slow http responses are worse. Fix #4975
* bench: Make http easier to profileisaacs2013-02-251-3/+2
| | | | | | Do not run the http/simple.js server in a child process. Fix #4831
* bench: Consistency in benchmark filenamesisaacs2013-02-191-0/+0
|
* bench: Use wrk for http benchmarkingisaacs2013-02-192-11/+7
| | | | Remove ab, since it's no longer used.
* bench: http benchmarksisaacs2013-02-192-0/+66
Also: make http_simple less chatty