CoolFace
Apppublic

strong-tie/inbound-calls

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
Benchmarking.md61 linesDownload Raw Back to Guides
1<h1 align="center">Fastify</h1>2 3## Benchmarking4Benchmarking is important if you want to measure how a change can affect the5performance of your application. We provide a simple way to benchmark your6application from the point of view of a user and contributor. The setup allows7you to automate benchmarks in different branches and on different Node.js8versions.9 10The modules we will use:11- [Autocannon](https://github.com/mcollina/autocannon): A HTTP/1.1 benchmarking12  tool written in node.13- [Branch-comparer](https://github.com/StarpTech/branch-comparer): Checkout14  multiple git branches, execute scripts and log the results.15- [Concurrently](https://github.com/kimmobrunfeldt/concurrently): Run commands16  concurrently.17- [Npx](https://github.com/npm/npx): NPM package runner used to run scripts18  against different Node.js Versions and execute local binaries. Shipped with19  npm@5.2.0.20 21## Simple22 23### Run the test in the current branch24```sh25npm run benchmark26```27 28### Run the test against different Node.js versions ✨29```sh30npx -p node@10 -- npm run benchmark31```32 33## Advanced34 35### Run the test in different branches36```sh37branchcmp --rounds 2 --script "npm run benchmark"38```39 40### Run the test in different branches against different Node.js versions ✨41```sh42branchcmp --rounds 2 --script "npm run benchmark"43```44 45### Compare current branch with main (Gitflow)46```sh47branchcmp --rounds 2 --gitflow --script "npm run benchmark"48```49or50```sh51npm run bench52```53 54### Run different examples55 56<!-- markdownlint-disable -->57```sh58branchcmp --rounds 2 -s "node ./node_modules/concurrently -k -s first \"node ./examples/asyncawait.js\" \"node ./node_modules/autocannon -c 100 -d 5 -p 10 localhost:3000/\""59```60<!-- markdownlint-enable -->61