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+
1525Most of the HTTP benchmarks require a benchmarker to be installed, this can be
1626either [ ` 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
2030path, 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
2434easily 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
3947To analyze the results ` R ` should be installed. Check you package manager or
4048download it from https://www.r-project.org/ .
@@ -48,7 +56,6 @@ install.packages("ggplot2")
4856install.packages(" plyr" )
4957```
5058
51- ### CRAN Mirror Issues
5259In the event you get a message that you need to select a CRAN mirror first.
5360
5461You 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
139146will run each benchmark multiple times, making it possible to calculate
140147statistics on the performance measures.
141148
@@ -144,7 +151,7 @@ As an example on how to check for a possible performance improvement, the
144151an 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+
287296All benchmarks use the ` require('../common.js') ` module. This contains the
288297` createBenchmark(main, configs[, options]) ` method which will setup your
289298benchmark.
@@ -367,7 +376,7 @@ function main(conf) {
367376}
368377```
369378
370- ## Creating HTTP benchmark
379+ ### Creating an HTTP benchmark
371380
372381The ` bench ` object returned by ` createBenchmark ` implements
373382` http(options, callback) ` method. It can be used to run external tool to
0 commit comments