Debian Codegraph @

benchmark/README.md

raw symbols SCIP
1 PEG.js Benchmark Suite
2 ======================
3
4 This is the PEG.js benchmark suite. It measures speed of the parsers generated
5 by PEG.js on various inputs. Its main goal is to provide data for code generator
6 optimizations.
7
8 Running in Node.js
9 ------------------
10
11 All commands in the following steps need to be executed in PEG.js root directory
12 (one level up from this one).
13
14 1. Install all PEG.js dependencies, including development ones:
15
16 ```console
17 $ npm install
18 ```
19
20 2. Execute the benchmark suite:
21
22 ```console
23 $ make spec
24 ```
25
26 3. Wait for results.
27
28 Running in the Browser
29 ----------------------
30
31 All commands in the following steps need to be executed in PEG.js root directory
32 (one level up from this one).
33
34 1. Make sure you have Node.js installed.
35
36 2. Install all PEG.js dependencies, including development ones:
37
38 ```console
39 $ npm install
40 ```
41
42 3. Build browser version of PEG.js:
43
44 ```console
45 $ make browser
46 ```
47
48 4. Serve PEG.js root directory using a web server:
49
50 ```console
51 $ node_modules/.bin/http-server
52 ```
53
54 5. Point your browser to the [benchmark suite](http://localhost:8080/benchmark/index.html).
55
56 6. Click the **Run** button and wait for results.