https://github.com/slavahatnuke/uspeed
uspeed - node.js package to test performance / debug based
https://github.com/slavahatnuke/uspeed
Last synced: 2 months ago
JSON representation
uspeed - node.js package to test performance / debug based
- Host: GitHub
- URL: https://github.com/slavahatnuke/uspeed
- Owner: slavahatnuke
- Created: 2018-08-21T18:27:00.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-22T07:32:04.000Z (almost 7 years ago)
- Last Synced: 2024-04-29T21:48:45.382Z (about 1 year ago)
- Language: JavaScript
- Size: 308 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## USpeed
Your speed meter inline. [debug](https://www.npmjs.com/package/debug) based
### Example
```javascript
const {Speed} = require('uspeed');
const speed = Speed('speed:date:now');let i = 1e6;
while (i--) {
speed(Date.now())
}```

#### Usage
```
export DEBUG=speed:*
node demo.js
```### Output
```
speed:date:now Speed: 100000 / 18 ms | 5555555 / s | 333333300 / m | 19999998000 / h | 479999952000 / day | 1534876464877 | 13 B +0ms
...
```### Optional ENV
```
export SPEED_EACH=100000 ## optional, print result each 100000 iteration
export SPEED_SAMPLE=500 ## optional, print max size of result
```