perfocode
The simplest performance checker.
Installation
npm
npm i perfocode -D
yarn
yarn add perfocode -D
Using
Create index.js
with the next code.
const perfocode describe test =
Run the file.
node index.js
When a compare file does not exist you will see only current results.
Press enter
if you wanna save the results to output-file.json
.
Run the test again, and you will see the difference between the current and the previous results.
Any next running will show min
, max
, previous min
, previous max
, current value
and average value
.
Average value has yellow color. Then you can see 3 numbers. The first one is the minimum value. The last one is the maximum. The current value is colorful. Gray values are the minimum and the maximum values before.
You can modify index.js
to change performance of getter.
const perfocode describe test =
Run the file and you see big changes in performance.
Also, it works if you have big improvements.
You can run describe
and test
anywhere.
You can change testing timeout by 3rd argument of perfocode
, describe
and test
Issues
If you find a bug or have a suggestion, please file an issue on GitHub