An open API service indexing awesome lists of open source software.

https://github.com/jmdisuanco/node-framework-benchmarker

Benchmarker for web frameworks
https://github.com/jmdisuanco/node-framework-benchmarker

benchmark benchmarking framework microservice nodejs webservice

Last synced: about 1 year ago
JSON representation

Benchmarker for web frameworks

Awesome Lists containing this project

README

          

# Node Framework Benchmarker

Benchmarking tool for various nodejs web framework

- Currently benchmarking servers that resturns strinigified JSON Objects using built-in or if non using Node's JSON.stringify()

## Installation

- `git clone https://github.com/jmdisuanco/node-framework-benchmarker.git`
- `cd node-framework-benchmarker`
- `npm install`

## Run a Benchmarking Test

- `npm start`
- report files will be saved inside data directory
- `report.json`
- `summary.md`

## To Add a Node Framework

- Create a file inside frameworks directory where the filename is the name of the package example for Pinipig Framework filename is pinipig.js
- Important note : make sure your script console.log something on server start
- refer on the files inside frameworks directory

## To add a framework

- update the `package.json`
- and a server file inside frameworks directory
- Test
- and submit a PR

# What's inside

- Autocannon!

#Sample summary report

# Environment

| Model | Cores | Ram (gb) |
| ----------------------------------------- | ----- | -------- |
| Intel(R) Core(TM) i7-2720QM CPU @ 2.20GHz | 8 | 16 |

# Benchmark Summary

| Framework | Version | Req/sec |
| --------- | ------- | ------- |
| pinipig | ^1.3.15 | 40219 |
| bare | | 26235 |
| polka | ^0.5.2 | 24978 |
| fastify | ^2.0.0 | 24713 |
| hapi | ^18.1.0 | 10740 |
| express | ^4.16.4 | 10394 |

# Configuration Used

```javascript
{
"port": 5000,
"url": "http://localhost",
"connections": 100,
"pipelining": 10,
"duration": 5
}
```

Report generated by [node-framework-benchmarker](https://github.com/jmdisuanco/node-framework-benchmarker)

# Contribution

- Pull Requests are welcome :)

# License

MIT License

Copyright (c) 2019 John Martin R. Disuanco

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.