diff options
author | Rich Trott <rtrott@gmail.com> | 2015-06-13 09:07:20 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2015-06-15 08:44:11 -0700 |
commit | 5c2707c1b2078e0d4ede7fadb1adfa5eebf29210 (patch) | |
tree | 25f71f580ea86ceb45a1adfb30df0ab90ad7f994 /benchmark | |
parent | 3777f415625ce538de5edbb19f7330356da190a8 (diff) | |
download | node-new-5c2707c1b2078e0d4ede7fadb1adfa5eebf29210.tar.gz |
doc: benchmark/README.md copyedit
PR-URL: https://github.com/nodejs/io.js/pull/1970
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/README.md | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/benchmark/README.md b/benchmark/README.md index dc6f53fbe7..7ed96403bc 100644 --- a/benchmark/README.md +++ b/benchmark/README.md @@ -13,9 +13,11 @@ These are most often available through your preferred package manager. ## How to run tests -There are two ways to run benchmark tests: +There are three ways to run benchmark tests: -1. Run all tests of a given type, for example, buffers +### Run all tests of a given type + +For example, buffers: ```sh iojs benchmark/common.js buffers @@ -24,7 +26,7 @@ iojs benchmark/common.js buffers The above command will find all scripts under `buffers` directory and require each of them as a module. When a test script is required, it creates an instance of `Benchmark` (a class defined in common.js). In the next tick, the `Benchmark` -constructor iterates through the configuration object property values and run +constructor iterates through the configuration object property values and runs the test function with each of the combined arguments in spawned processes. For example, buffers/buffer-read.js has the following configuration: @@ -75,7 +77,11 @@ buffers/buffer-read.js noAssert=false buffer=fast type=UInt16BE millions=1: 244. ... ``` -2. Run an individual test, for example, buffer-slice.js +The last number is the rate of operations. Higher is better. + +### Run an individual test + +For example, buffer-slice.js: ```sh iojs benchmark/buffers/buffer-read.js @@ -88,7 +94,7 @@ buffers/buffer-read.js noAssert=false buffer=fast type=UInt16BE millions=1: 245. ... ``` -3. Run tests with options +### 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.) |