Repository made to compare graphql and rest.
- nix installed
- docker
The easiest way to run the project is runnning nix develop .
which sets up whole environment
and then running ./run_benchmarks.sh
script which spins up necesarry containers, starts server and runs tests.
To manually run the project use docker compose up -d && sleep 5 && cd seedData && bun install && bun run main.ts
command
then open two terminals. Start server in one cd server && bun install && bun run index.ts
and run benchmarks in the other one cd benchmark; bun install && bun run rest.ts && bun run graphql.ts
- Avg time: 69.58s
- Avg Requests per second: 14.37
- Total response size: 81MB
- Avg time: 25.46s
- Avg Requests per second: 39.26
- Total response size: 18.03MB
- Avg time: 1.99s
- Avg Requests per second: 500.25
- Total response size: 19.34MB
- Avg time: 2.27s
- Avg Requests per second: 438.78
- Total response size: 18.23MB