Skip to content

Commit 5c2707c

Browse files
committed
doc: benchmark/README.md copyedit
PR-URL: nodejs#1970 Reviewed-By: Johan Bergström <[email protected]>
1 parent 3777f41 commit 5c2707c

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

benchmark/README.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -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
2123
iojs benchmark/common.js buffers
@@ -24,7 +26,7 @@ iojs benchmark/common.js buffers
2426
The above command will find all scripts under `buffers` directory and require
2527
each of them as a module. When a test script is required, it creates an instance
2628
of `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
2830
the test function with each of the combined arguments in spawned processes. For
2931
example, 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
8187
iojs 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

9399
This 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

Comments
 (0)