-
Notifications
You must be signed in to change notification settings - Fork 854
Build all frameworks with docker
The docker container allows us to build all frameworks on a defined platform whilst supporting Windows 10 Professional, OSX and Linux as the host platform. For all frameworks the build process happens inside the docker container. There's even a headless chrome and the benchmarks test driver (webdriver-ts) that can perform basic checks inside the container. A node http-server publishes the bundled benchmark implementations and serves them available on port 8080.
The real benchmark run is the performed on the host machine with the system browser installed.
Building locally is still supported and might be preferred for benchmark implementation contributors.
Install dependencies
npm install
Install webdriver-ts and webdriver-ts-results dependencies. Both will be executed on your host machine.
npm run install-local
Make sure docker is running. Prepare a docker volume:
docker volume create js-framework-benchmark
Build the docker image [maybe one day pull image from registry]
npm run docker-build
Start the docker container
npm run docker-start
Build all frameworks with docker
npm run docker-build-frameworks
Rebuild a framework in docker and run some smoke tests. It first syncs the source code, then deletes and reinstalls the node modules, builds the framework, runs all benchmarks with a small iteration count and checks whether the keyed categorization is correct with a headless chrome. Very recommended before submitting a PR:
npm run docker-rebuild non-keyed/surplus
Run the benchmark from the local machine:
npm run bench
or if you want to control which frameworks
cd webdriver-ts
run whatever framework you want
npm run bench -- --framework vanillajs-keyed --benchmark 01_ --count 3
and update the result table
npm run results
Here's a picture of the setup:
Get rid of it again
Stop the docker container
npm run docker-stop
Delete the volume
docker volume rm js-framework-benchmark
[To be continued...]