Skip to content

Commit 01a95ea

Browse files
committed
results for chrome 101
1 parent 408c8af commit 01a95ea

File tree

6 files changed

+3238
-3188
lines changed

6 files changed

+3238
-3188
lines changed

README.md

Lines changed: 85 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# js-framework-benchmark
23

34
This is a simple benchmark for several javascript frameworks. The benchmarks creates a large table with randomized entries and measures the time for various operations including rendering duration.
@@ -43,30 +44,95 @@ The current snapshot that may not have the same quality (i.e.
4344
results might be for mixed browser versions, number of runs per benchmark may vary) can be seen [here](https://rawgit.com/krausest/js-framework-benchmark/master/webdriver-ts-results/table.html)
4445
[![Results](images/results.png?raw=true "Results")](https://krausest.github.io/js-framework-benchmark/current.html)
4546

46-
## 1. Using the benchmark tool
47+
# 1 NEW + experimental: Run pre-built binaries for all frameworks
4748

4849
There are currently ~60 framework entries in this repository. Installing (and maintaining) those can be challenging, but here are simplified instructions how to get started.
4950

50-
### 1.1 Prerequisites
51+
## 1.1 Prerequisites
52+
53+
Have _node.js (>=v16.14.2)_ installed. If you want to do yourself a favour use nvm for that and install yarn. The benchmark has been tested with node vv16.14.2.
54+
Please make sure that the following command work before trying to build:
55+
56+
```
57+
> npm
58+
npm -version
59+
8.5.0
60+
> node --version
61+
v16.14.2
62+
```
63+
64+
## 1.2 Downloading the pre-built binaries and starting the server
65+
Builiding all frameworks can be challenging. There's a new way that allows to skip that and just run the benchmark without builiding all implementationss.
66+
67+
68+
Start with checking out a tagged release like that. Pick the release that you want (e.g. chrome 100):
69+
```
70+
git clone https://github.com/krausest/js-framework-benchmark.git
71+
cd js-framework-benchmark
72+
git checkout chrome100 -b release
73+
npm ci && npm run install-local
74+
```
75+
Download the build.zip for that release from https://github.com/krausest/js-framework-benchmark/releases
76+
and put the build.zip into the js-framework-benchmark directory and unzip the prebuilt files:
77+
```
78+
unzip build.zip
79+
```
80+
You're now ready to start the http-server. Let the server run in the background
81+
```
82+
npm start
83+
```
84+
## 1.3 Running the benchmarks and handling errors
85+
86+
In a new console window you can now run the benchmarks:
87+
```
88+
npm run bench
89+
```
90+
91+
This will take some time (currently about 12 hours on my machine). Finally create the results table:
92+
```
93+
npm run results
94+
```
95+
96+
Open js-framework-benchmark/webdriver-ts-results/table.html in a browser and take a look at the results. You can open the result table with the link [http://localhost:8080/webdriver-ts-results/table.html](http://localhost:8080/webdriver-ts-results/table.html)
5197

52-
Have _node.js (>=10.0)_ installed. If you want to do yourself a favour use nvm for that and install yarn. The benchmark has been tested with node v10.16.3.
98+
99+
Here's what you should do when the benchmark run was not sucessful. Let's assume the benchmark printed the following to the console:
100+
```
101+
================================
102+
The following benchmarks failed:
103+
================================
104+
Executing frameworks/non-keyed/ef-js and benchmark 04_select1k failed: No paint event found
105+
run was not completely sucessful Benchmarking failed with errors
106+
```
107+
You'll now have to run the benchmark again for those that failed like that:
108+
```
109+
npm run bench -- --framework non-keyed/ef-js --benchmark 04_
110+
```
111+
The you can then continue with creating the results table `npm run results`.
112+
Another workaround is to delete the folders of frameworks you can't run or you are not interested in.
113+
114+
# 2 Building the frameworks and running the benchmark
115+
116+
## 2.1 Prerequisites
117+
118+
Have _node.js (>=v16.14.2)_ installed. If you want to do yourself a favour use nvm for that and install yarn. The benchmark has been tested with node vv16.14.2.
53119
For some frameworks you'll also need _java_ (>=8, e.g. openjdk-8-jre on ubuntu).
54120
Please make sure that the following command work before trying to build:
55121

56122
```
57123
> npm
58124
npm -version
59-
5.0.0
125+
8.5.0
60126
> node --version
61-
v8.0.0
127+
v16.14.2
62128
> echo %JAVA_HOME% / echo $JAVA_HOME
63129
> java -version
64130
java version "1.8.0_131" ...
65131
> javac -version
66132
javac 1.8.0_131
67133
```
68134

69-
### 1.2 Start installing
135+
## 2.2 Start installing
70136

71137
As stated above building and running the benchmarks for all frameworks can be challenging, thus we start step by step...
72138

@@ -114,7 +180,7 @@ There should be no build errors and we can open the framework in the browser:
114180

115181
Some frameworks like binding.scala or ember can't be opened that way, because they need a 'dist' or 'target/web/stage' or something in the URL. You can find out the correct URL in the [index.html](http://localhost:8080/index.html) you've opened before or take a look whether there's a customURL property under js-framework-benchmark in the [package.json](https://github.com/krausest/js-framework-benchmark/blob/master/frameworks/keyed/ember/package.json#L10) that represents the url.
116182

117-
### 1.4 Running benchmarks for a single framework
183+
## 2.3 Running benchmarks for a single framework
118184

119185
The benchmark uses an automated benchmark driver using chromedriver to measure the duration for each operation using chrome's timeline. Here are the steps to run is for a single framework:
120186

@@ -163,7 +229,7 @@ npm run isKeyed keyed/vanillajs
163229

164230
If it finds anything it'll report an ERROR.
165231

166-
### 1.5 Building the result table
232+
### 2.4 Building the result table
167233

168234
Install libraries:
169235

@@ -185,15 +251,15 @@ Now a result table should have been created which can be opened on [http://local
185251
There's nothing in table except for the column vanillajs-keyed at the right end of the first table.
186252
![First Run Results](images/staticResults.png?raw=true "First Run Results")
187253

188-
### 1.6 [Optional] Updating the index.html file
254+
## 2.4 [Optional] Updating the index.html file
189255

190256
This simply rebuilds the file used to display the table, not the results.
191257

192258
```
193259
npm run index
194260
```
195261

196-
### 1.7 [Optional] Building and running the benchmarks for all frameworks
262+
## 2.5 [Optional] Building and running the benchmarks for all frameworks
197263

198264
This is not for the faint at heart. You can build all frameworks simply by issuing:
199265

@@ -214,7 +280,7 @@ in the root directory.
214280

215281
After that you can check all results in [http://localhost:8080/webdriver-ts/table.html](http://localhost:8080/webdriver-ts/table.html).
216282

217-
### 1.8 Tips and tricks
283+
# 3 Tips and tricks
218284

219285
- You can run multiple implementations by passing their directory names (cd to webdriver-ts):
220286
`npm run bench keyed/angular keyed/react`.
@@ -226,9 +292,9 @@ After that you can check all results in [http://localhost:8080/webdriver-ts/tabl
226292
- If you can't get one framework to compile or run, just move it out of the frameworks directory and re-run
227293
- One can check whether an implementation is keyed or non-keyed via `npm run isKeyed` in the webdriver-ts directory. You can limit which frameworks to check in the same way as the webdriver test runner like e.g. `npm run isKeyed keyed/svelte`. The program will report an error if a benchmark implementation is incorrectly classified.
228294

229-
## 2. Contributing a new implementation
295+
## 4. Contributing a new implementation
230296

231-
### 2.1 Building the app
297+
## 4.1 Building the app
232298

233299
For contributions it is basically sufficient to create a new directory for your framework that supports `npm install` and `npm run build-prod` and can be then opened in the browser. All other steps are optional. Let's simulate that by copying vanillajs.
234300

@@ -250,7 +316,7 @@ In most cases you'll need `npm install` and `npm run build-prod` and then check
250316

251317
(Of course in reality you'd rather throw out the javascript source files and use your framework there instead of only changing the html file.)
252318

253-
### 2.2 Adding your new implementation to the results table.
319+
## 4.2 Adding your new implementation to the results table.
254320

255321
(Notice: Updating common.ts is no longer necessary, super-vanillajs is visible in the result table)
256322

@@ -286,7 +352,7 @@ The other important, but optional properties for js-framework-benchmark are show
286352

287353
You can set an optional different URL if needed or specify that your DOM uses a shadow root.
288354

289-
### 2.3 Submitting your framework
355+
## 4.3 Submitting your implementation
290356

291357
Contributions are very welcome. Please use the following rules:
292358

@@ -323,15 +389,15 @@ This work is derived from a benchmark that Richard Ayotte published on https://g
323389

324390
Thanks to Baptiste Augrain for making the benchmarks more sophisticated and adding frameworks.
325391

326-
## History
392+
# History
327393

328394
Frameworks without significant activity on github or npm for more than a year will be removed (_automatic commits like dependabot and minor updates, like docs editions, are ignored_).
329395

330396
Will be removed in future:
331397

332398
- [ ] crui Last significant commit Jul 28, 2019
333399

334-
### 2020-7-9
400+
## 2020-7-9
335401

336402
- [x] etch Last commit Sep 12, 2018
337403
- [x] hyperoop Last significant commit Dec 23, 2018
@@ -345,10 +411,11 @@ Will be removed in future:
345411
- [x] gruu Last commit Jun 23, 2019
346412
- [x] lite-html Last commit Sep 7, 2018
347413

348-
### 2019-9-16
414+
## 2019-9-16
349415

350416
- [x] angular-light Last commit Nov 30, 2017
351417
- [x] nx. Last commit Feb 2017
352418
- [x] maik-h Last commit Dec 15, 2017
353419
- [x] rivets Last commit Oct 22, 2016
354420
- [x] tsers. Last commit Jun 19, 2016
421+

webdriver-ts-results/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const App = () => {
1515
return (
1616
<div>
1717
{disclaimer}
18-
<p>The benchmark was run on a Razer Blade 15 Advanced (i7-8750H, 64 GB RAM, Fedora 36 (Linux 5.17.1, mitigations=off, Wayland), Chrome 100.0.4896.127 (64-bit))</p>
18+
<p>The benchmark was run on a Razer Blade 15 Advanced (i7-8750H, 64 GB RAM, Fedora 36 (Linux 5.17.3, mitigations=off, Wayland), Chrome 101.0.4951.41 (64-bit))</p>
1919
<SelectionBar/>
2020
<ResultTable type={FrameworkType.KEYED}/>
2121
<ResultTable type={FrameworkType.NON_KEYED}/>

0 commit comments

Comments
 (0)