Skip to content

Commit fd331c1

Browse files
committed
fix benchmark guide links
1 parent 09f96f7 commit fd331c1

File tree

2 files changed

+28
-16
lines changed

2 files changed

+28
-16
lines changed

benchmark/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,15 +215,18 @@ writing benchmarks.
215215

216216
### createBenchmark(fn, configs[, options])
217217

218-
See [the guide on writing benchmarks](../doc/guides/writing-and-running-benchmarks.md#creating-a-benchmark).
218+
See [the guide on writing benchmarks](../doc/guides/writing-and-running-benchmarks.md#basics-of-a-benchmark).
219219

220220
### default\_http\_benchmarker
221221

222222
The default benchmarker used to run HTTP benchmarks.
223+
See [the guide on writing HTTP benchmarks](../doc/guides/writing-and-running-benchmarks.md#creating-an-http-benchmark).
224+
223225

224226
### PORT
225227

226228
The default port used to run HTTP benchmarks.
229+
See [the guide on writing HTTP benchmarks](../doc/guides/writing-and-running-benchmarks.md#creating-an-http-benchmark).
227230

228231
### sendResult(data)
229232

doc/guides/writing-and-running-benchmarks.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,32 @@
33
## Table of Contents
44

55
* [Prerequisites](#prerequisites)
6+
* [HTTP Benchmark Requirements](#http-benchmark-requirements)
7+
* [Benchmark Analysis Requirements](#benchmark-analysis-requirements)
68
* [Running benchmarks](#running-benchmarks)
7-
* [Running individual benchmarks](#running-individual-benchmarks)
8-
* [Running all benchmarks](#running-all-benchmarks)
9-
* [Comparing node versions](#comparing-node-versions)
10-
* [Comparing parameters](#comparing-parameters)
9+
* [Running individual benchmarks](#running-individual-benchmarks)
10+
* [Running all benchmarks](#running-all-benchmarks)
11+
* [Comparing Node.js versions](#comparing-nodejs-versions)
12+
* [Comparing parameters](#comparing-parameters)
1113
* [Creating a benchmark](#creating-a-benchmark)
14+
* [Basics of a benchmark](#basics-of-a-benchmark)
15+
* [Creating an HTTP benchmark](#creating-an-http-benchmark)
1216

1317
## Prerequisites
1418

19+
Basic Unix tools are required for some benchmarks.
20+
[Git for Windows][git-for-windows] includes Git Bash and the necessary tools,
21+
which need to be included in the global Windows `PATH`.
22+
23+
### HTTP Benchmark Requirements
24+
1525
Most of the HTTP benchmarks require a benchmarker to be installed, this can be
1626
either [`wrk`][wrk] or [`autocannon`][autocannon].
1727

18-
`Autocannon` is a Node script that can be installed using
19-
`npm install -g autocannon`. It will use the Node executable that is in the
28+
`Autocannon` is a Node.js script that can be installed using
29+
`npm install -g autocannon`. It will use the Node.js executable that is in the
2030
path, hence if you want to compare two HTTP benchmark runs make sure that the
21-
Node version in the path is not altered.
31+
Node.js version in the path is not altered.
2232

2333
`wrk` may be available through your preferred package manager. If not, you can
2434
easily build it [from source][wrk] via `make`.
@@ -32,9 +42,7 @@ benchmarker to be used by providing it as an argument, e. g.:
3242

3343
`node benchmark/http/simple.js benchmarker=autocannon`
3444

35-
Basic Unix tools are required for some benchmarks.
36-
[Git for Windows][git-for-windows] includes Git Bash and the necessary tools,
37-
which need to be included in the global Windows `PATH`.
45+
### Benchmark Analysis Requirements
3846

3947
To analyze the results `R` should be installed. Check you package manager or
4048
download it from https://www.r-project.org/.
@@ -48,7 +56,6 @@ install.packages("ggplot2")
4856
install.packages("plyr")
4957
```
5058

51-
### CRAN Mirror Issues
5259
In the event you get a message that you need to select a CRAN mirror first.
5360

5461
You can specify a mirror by adding in the repo parameter.
@@ -133,9 +140,9 @@ It is possible to execute more groups by adding extra process arguments.
133140
$ node benchmark/run.js arrays buffers
134141
```
135142

136-
### Comparing node versions
143+
### Comparing Node.js versions
137144

138-
To compare the effect of a new node version use the `compare.js` tool. This
145+
To compare the effect of a new Node.js version use the `compare.js` tool. This
139146
will run each benchmark multiple times, making it possible to calculate
140147
statistics on the performance measures.
141148

@@ -144,7 +151,7 @@ As an example on how to check for a possible performance improvement, the
144151
an example. This pull request _claims_ to improve the performance of the
145152
`string_decoder` module.
146153

147-
First build two versions of node, one from the master branch (here called
154+
First build two versions of Node.js, one from the master branch (here called
148155
`./node-master`) and another with the pull request applied (here called
149156
`./node-pr-5135`).
150157

@@ -284,6 +291,8 @@ chunk encoding mean confidence.interval
284291

285292
## Creating a benchmark
286293

294+
### Basics of a benchmark
295+
287296
All benchmarks use the `require('../common.js')` module. This contains the
288297
`createBenchmark(main, configs[, options])` method which will setup your
289298
benchmark.
@@ -367,7 +376,7 @@ function main(conf) {
367376
}
368377
```
369378

370-
## Creating HTTP benchmark
379+
### Creating an HTTP benchmark
371380

372381
The `bench` object returned by `createBenchmark` implements
373382
`http(options, callback)` method. It can be used to run external tool to

0 commit comments

Comments
 (0)