Name: js-framework-benchmark
Owner: Svelte
Description: A comparison of the perfomance of a few popular javascript frameworks
Forked from: krausest/js-framework-benchmark
Created: 2017-05-17 14:09:59.0
Updated: 2017-05-17 14:10:01.0
Pushed: 2017-05-17 18:36:30.0
Size: 1902
Language: HTML
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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.
This work is derived from a benchmark that Richard Ayotte published on https://gist.github.com/RichAyotte/a7b8780341d5e75beca7 and adds more framework and more operations. Thanks for the great work.
Thanks to Baptiste Augrain for making the benchmarks more sophisticated and adding frameworks.
Chrome 54 on OSX has a bug that causes webdriver to hang or crash on non english systems. Please run the following command prior to executing the webdriver-ts testdriver:`
export LANG="en_US.UTF-8"
`
Have node.js (>=6.0) installed. If you want to do yourself a favour use nvm for that and install yarn. The benchmark has been tested with node 6.0. You will also need java (>=8, e.g. openjdk-8-jre on ubuntu) for the google closure compiler, currently used in kivi. Further maven is needed and the bin directory of maven must be added to the path. Please make sure that the following command work before trying to build:
m
-version
5
de --version
.0
ho %JAVA_HOME% / echo $JAVA_HOME
va -version
version "1.8.0_111" ...
vac -version
c 1.8.0_111
n -version
he Maven 3.3.9 (...
t --version
version 2.11.0.windows.3
npm install
or
yarn
npm run build
The latter calls npm build-prod in each subproject.
cd aurelia
npm install
or
yarn
npm run build-prod
Execute npm start
in the main directory to start a http-server for the web pages.
Open http://localhost:8080 and choose the directory for the framework you want to test.
Most actions will try to measure the duration and print it to the console. Depending on the framework this might be more or less precise. To measure the exact numbers one needs to use e.g. the timeline from the chrome dev tools.
For all benchmarks the duration is measured including rendering time. You can read some details on this article. The results of this benchmark is outlined on my blog (round 1, round 2, round 3, round 4, and round 5).
The former java test runner has been replaced with a typescript based test runner. The new test runner contains no timer based waits and is thus much faster.
npm start
which starts a web server
npm run selenium
which runs the seleniums tests
Open http://localhost:8080/webdriver-ts/table.html for the results
A test showing the durations on my machine (MacBook Pro 15, 2,5 GHz i7, 16 GB RAM) can be seen here
Single tests can be repeated easily. Just cd webdriver-ts
and run the benchmarks and frameworks you want, e.g:
npm run selenium -- --framework angular bob --benchmark 01_ 02_
runs the test for all frameworks that contain either angular or bob, which means all angular versions and bobril and all benchmarks whose id contain 01 or 02
which means the create rows and replace all rows benchmarks.
After that you'll want to update the result table with
npm run results
Contributions are very welcome. Please use the following rules:
How to start submitting a new implementation:
npm install
would be next and will invoke install.js that in turn calls npm install
in every folder. If you're not interested in mirroring npm just remove the folders for frameworks you're not interested in and run npm install
then.npm install
(or npm run build-prod
if you really want to build all benchmarks again). The install and build process prints the name of the folder it is currently working on so it should be simple to find which folder causes the problems.npm install
installs all neccessary dependencies including grunt, webpack, gulp and so on (the only thing you don't need is http-server).npm run build-prod
and run it just with npm run selenium -- --framework framework-version
if you want to run your version only or just npm run selenium
if you have time, built everything and want to run the benchmarks for all frameworks. The results will be written in the directory webdriver-ts/results in JSON format. npm run results
will create the results table that can be opened on http://localhost:8080/webdriver-ts/table.html. If you don't I'll update webdriver-ts for you ;-)