diff options
author | Fishrock123 <fishrock123@rocketmail.com> | 2015-01-27 18:28:41 -0500 |
---|---|---|
committer | Fishrock123 <fishrock123@rocketmail.com> | 2015-01-28 16:56:26 -0500 |
commit | 514b1d964b2e67d0594c6a44a22fbc29fe71454b (patch) | |
tree | 08f36fc6b2b020b6a475d6a097d0d61a256dc892 /benchmark/README.md | |
parent | 097fde7129a3acc660beb372cecd9daf1164a7f2 (diff) | |
download | android-node-v8-514b1d964b2e67d0594c6a44a22fbc29fe71454b.tar.gz android-node-v8-514b1d964b2e67d0594c6a44a22fbc29fe71454b.tar.bz2 android-node-v8-514b1d964b2e67d0594c6a44a22fbc29fe71454b.zip |
doc: add more info to benchmark/README.md
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>
Diffstat (limited to 'benchmark/README.md')
-rw-r--r-- | benchmark/README.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/benchmark/README.md b/benchmark/README.md index 95ade9840d..ab168911af 100644 --- a/benchmark/README.md +++ b/benchmark/README.md @@ -3,6 +3,14 @@ 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: @@ -80,6 +88,20 @@ buffers/buffer-read.js noAssert=false buffer=fast type=UInt16BE millions=1: 245. ... ``` +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, |