Adds info on the `wrk` prerequisite for http benchmarks and how to
run benchmarks with options.
PR-URL: https://github.com/iojs/io.js/pull/629
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
This folder contains benchmark tests to measure the performance for certain
io.js APIs.
+## prerequisites
+
+Most of the http benchmarks require `wrk` to be compiled beforehand.
+
+```sh
+make wrk
+```
+
## How to run tests
There are two ways to run benchmark tests:
...
```
+3. Run tests with options
+
+This example will run only the first type of url test, with one iteration.
+(Note: benchmarks require __many__ iterations to be statistically accurate.)
+
+
+```sh
+iojs benchmark/url/url-parse.js type=one n=1
+```
+Output:
+```
+url/url-parse.js type=one n=1: 1663.74402
+```
+
## How to write a benchmark test
The benchmark tests are grouped by types. Each type corresponds to a subdirectory,