https://github.com/karimsa/http-bench
PoC examples for my talk @ ForwardJS Ottawa 2019.
https://github.com/karimsa/http-bench
Last synced: 3 months ago
JSON representation
PoC examples for my talk @ ForwardJS Ottawa 2019.
- Host: GitHub
- URL: https://github.com/karimsa/http-bench
- Owner: karimsa
- License: mit
- Created: 2019-03-07T07:55:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-10T02:35:13.000Z (about 6 years ago)
- Last Synced: 2025-03-11T21:04:00.614Z (3 months ago)
- Language: JavaScript
- Homepage: https://slides.com/karimalibhai/js-perf-2019
- Size: 129 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# 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:
- pure express code: [benchmarks/express.js](benchmarks/express.js)
- express-like code with macros: [src/express.js](src/express.js)
- node bare http code: [benchmarks/bare.js](benchmarks/bare.js)### 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](https://github.com/fastify/benchmarks) (also under MIT license).