https://github.com/n-ce/pitstop
🏎️ 💨 An easy to use and simple performance comparison, analysis and testing suite for JavaScript Functions. Only 0.8KB.
https://github.com/n-ce/pitstop
javascript-performance profiling test-suite
Last synced: 3 months ago
JSON representation
🏎️ 💨 An easy to use and simple performance comparison, analysis and testing suite for JavaScript Functions. Only 0.8KB.
- Host: GitHub
- URL: https://github.com/n-ce/pitstop
- Owner: n-ce
- License: mit
- Created: 2023-04-06T07:28:42.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-08T04:44:45.000Z (about 2 years ago)
- Last Synced: 2024-04-23T21:29:47.363Z (about 1 year ago)
- Topics: javascript-performance, profiling, test-suite
- Language: JavaScript
- Homepage: https://cdn.jsdelivr.net/gh/n-ce/pitStop/pitStop.js
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🏎️ 💨 PITSTOP

### Console based Basic performance testing, comparison and analysis suite for JavaScript functions
```
pitStop(
1000, // iterations
[], // put function args inside the array if required
forLoop, whileLoop // functions to compare
);
pitStop(
100000,
[12, 5],
lcmLow, lcmHigh, lcmgcd, lcmgcddr
);
```
### Suite
- **pitStop()** : provides a console table with relevant comparison analysis.
- **timeTaken()** : provides time taken for a function to compute.
- **randomNum()** : generates random number for inputs.### Usage
```
import { pitStop } from 'https://cdn.jsdelivr.net/gh/n-ce/pitStop/pitStop.js';
```
- The pitStop function takes three parameters mainly
- The First parameter is the number of times you want to run functions
- The Second parameter is an array which takes your function arguments if required otherwise leave it null
- The Third parameter is a rest parameter which takes your function names
- ex : pitStop(1000,[arg1,arg2,....],f1,f2,f3,....)