@@ -13,9 +13,11 @@ These are most often available through your preferred package manager.
13
13
14
14
## How to run tests
15
15
16
- There are two ways to run benchmark tests:
16
+ There are three ways to run benchmark tests:
17
17
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:
19
21
20
22
``` sh
21
23
iojs benchmark/common.js buffers
@@ -24,7 +26,7 @@ iojs benchmark/common.js buffers
24
26
The above command will find all scripts under ` buffers ` directory and require
25
27
each of them as a module. When a test script is required, it creates an instance
26
28
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
28
30
the test function with each of the combined arguments in spawned processes. For
29
31
example, buffers/buffer-read.js has the following configuration:
30
32
@@ -75,7 +77,11 @@ buffers/buffer-read.js noAssert=false buffer=fast type=UInt16BE millions=1: 244.
75
77
...
76
78
```
77
79
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:
79
85
80
86
``` sh
81
87
iojs benchmark/buffers/buffer-read.js
@@ -88,7 +94,7 @@ buffers/buffer-read.js noAssert=false buffer=fast type=UInt16BE millions=1: 245.
88
94
...
89
95
```
90
96
91
- 3 . Run tests with options
97
+ ### Run tests with options
92
98
93
99
This example will run only the first type of url test, with one iteration.
94
100
(Note: benchmarks require __ many__ iterations to be statistically accurate.)
0 commit comments