Skip to content
PoC examples for my talk @ ForwardJS Ottawa 2019.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
benchmarks
lib
run
scripts
src
.babelrc
.gitignore
.npmignore
.npmrc
.travis.yml
CODE_OF_CONDUCT.md
LICENSE
README.md
benchmark-bench.js
benchmark-compare.js
benchmark.js
package.json
rollup.config.js

README.md

http-bench

PoC examples for my talk @ ForwardJS Ottawa 2019.

Slides: https://slides.com/karimalibhai/js-perf-2019

Usage

Source files

The source code for the example is in the following files:

Building the rest

There are two examples that get compiled:

  • express-macros: this example uses babel-plugin-macros to show an express-like API that gets compiled into bare node http code.
  • express-minified: this example is just a bundled + minified copy of the express example.

To build these examples, simply run npm run build.

Scripts

  • ./scripts/bench-boot: takes a number & a command as a string - will execute the command that many times and display the average command startup time.
  • ./scripts/bench: takes a number & a space-separated list of benchmark names. Runs benchmarks for those examples via the fastify benchmarks toolset & displays the results.
  • ./scripts/_bench: same args as ./scripts/bench but will not display the results.
  • ./scripts/display: takes a space-separated list of benchmarks names & only displays the results (does not run the benchmarks).

License

Licensed under MIT license.

Repository is forked from fastify benchmarks (also under MIT license).

You can’t perform that action at this time.