# graphback-benchmarks

> Benchmarks for Graphback, a fast and low-overhead web framework.

Latest version **0.16.0-alpha3** (published 2020-08-11) · 0 weekly downloads

## Install

```sh
npm install graphback-benchmarks
pnpm add graphback-benchmarks
yarn add graphback-benchmarks
bun add graphback-benchmarks
```

Provides the command `benchmark`.

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.16.0-alpha3 |
| Published | 2020-08-11 |
| First published | 2020-08-11 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 25 |
| Unpacked size | 37.6 KB |
| Known vulnerabilities | 0 (+13 in 5 direct dependencies) |
| Install scripts | no |
| GitHub stars | 408 |
| Maintainers | aerogear-ci |

## Links

- npm: https://www.npmjs.com/package/graphback-benchmarks
- Repository: https://github.com/aerogear/graphback
- Homepage: https://github.com/aerogear/graphback#readme
- Issues: https://github.com/aerogear/graphback/issues
- npm.io page: https://npm.io/package/graphback-benchmarks

## Dependencies (25)

- [koa](https://npm.io/package/koa.md) 2.13.0
- [md5](https://npm.io/package/md5.md) 2.3.0
- [ora](https://npm.io/package/ora.md) 4.0.3
- [hapi](https://npm.io/package/hapi.md) 18.1.0
- [chalk](https://npm.io/package/chalk.md) 3.0.0
- [faker](https://npm.io/package/faker.md) 4.1.0
- [express](https://npm.io/package/express.md) 4.17.1
- [fastify](https://npm.io/package/fastify.md) 2.15.3
- [ps-tree](https://npm.io/package/ps-tree.md) 1.2.0
- [sqlite3](https://npm.io/package/sqlite3.md) 5.0.0
- [wait-on](https://npm.io/package/wait-on.md) 5.2.0
- [inquirer](https://npm.io/package/inquirer.md) 7.3.3
- [cli-table](https://npm.io/package/cli-table.md) 0.3.1
- [commander](https://npm.io/package/commander.md) 4.1.1
- [graphback](https://npm.io/package/graphback.md) 0.16.0-alpha3
- [@hapi/hapi](https://npm.io/package/@hapi/hapi.md) 18.4.1
- [autocannon](https://npm.io/package/autocannon.md) 4.6.0
- [apollo-fetch](https://npm.io/package/apollo-fetch.md) 0.7.0
- [graphql-api-koa](https://npm.io/package/graphql-api-koa.md) 4.1.2
- [apollo-server-koa](https://npm.io/package/apollo-server-koa.md) 2.16.1
- [apollo-opentracing](https://npm.io/package/apollo-opentracing.md) 1.5.0
- [apollo-server-hapi](https://npm.io/package/apollo-server-hapi.md) 2.16.1
- [autocannon-compare](https://npm.io/package/autocannon-compare.md) 0.4.0
- [apollo-server-express](https://npm.io/package/apollo-server-express.md) 2.16.1
- [apollo-server-fastify](https://npm.io/package/apollo-server-fastify.md) 2.16.1

## Recent versions

- 0.16.0-alpha3 (latest) — 2020-08-11
- 0.16.0-beta1 (next) — 2020-08-20
- 0.16.0-alpha7 — 2020-08-20
- 0.16.0-alpha6 — 2020-08-18
- 0.16.0-alpha5 — 2020-08-17
- 0.16.0-alpha4 — 2020-08-12

## README

Benchmark RSS, Startup time, Latency, Throughput and CPU usage of a GraphQL APIs.

# Usage

```
npm install
npm start
```

Follow the instruction and chose one, two or more [benchmarks](./benchmarks) you want to run and compare.

Once the run is complete, results will be generated in the `results` directory and a nice statistics table will be displayed.

## Which one is fast ?

Run the below command to compare which server is fast.

```shell
yarn compare
```

## Statistics table

Run the below command to generate statistics table which can be used to visualise detailed data.

```shell
yarn compare:stats
```

# Troubleshoot

The benchmark will launch server on port `29128`, this is closed once each test is finished. 
In situation where this port remain occupied, launch the following command to free the port for other usage.

```shell
kill $(lsof -t -i:29128)
```

# TODO

- [x] Add other server e.g fastify, hapi and see how they fare.
- [ ] Add more statistics details e.g 99th percentile, median etc in the descriptive table
- [ ] Benchmark create
- [ ] Benchmark delete
- [ ] Benchmark update
- [ ] Benchmark relationships
- [ ] Add real databases e.g sqlite, postgres, mongo and see how they fare vs one another

---
_Source: https://npm.io/package/graphback-benchmarks · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
