@@ -13,9 +13,11 @@ These are most often available through your preferred package manager.
1313
1414## How to run tests
1515
16- There are two ways to run benchmark tests:
16+ There are three ways to run benchmark tests:
1717
18- 1 . Run all tests of a given type, for example, buffers
18+ ### Run all tests of a given type
19+
20+ For example, buffers:
1921
2022``` sh
2123iojs benchmark/common.js buffers
@@ -24,7 +26,7 @@ iojs benchmark/common.js buffers
2426The above command will find all scripts under ` buffers ` directory and require
2527each of them as a module. When a test script is required, it creates an instance
2628of ` Benchmark ` (a class defined in common.js). In the next tick, the ` Benchmark `
27- constructor iterates through the configuration object property values and run
29+ constructor iterates through the configuration object property values and runs
2830the test function with each of the combined arguments in spawned processes. For
2931example, buffers/buffer-read.js has the following configuration:
3032
@@ -75,7 +77,11 @@ buffers/buffer-read.js noAssert=false buffer=fast type=UInt16BE millions=1: 244.
7577...
7678```
7779
78- 2 . Run an individual test, for example, buffer-slice.js
80+ The last number is the rate of operations. Higher is better.
81+
82+ ### Run an individual test
83+
84+ For example, buffer-slice.js:
7985
8086``` sh
8187iojs benchmark/buffers/buffer-read.js
@@ -88,7 +94,7 @@ buffers/buffer-read.js noAssert=false buffer=fast type=UInt16BE millions=1: 245.
8894...
8995```
9096
91- 3 . Run tests with options
97+ ### Run tests with options
9298
9399This example will run only the first type of url test, with one iteration.
94100(Note: benchmarks require __ many__ iterations to be statistically accurate.)
0 commit comments