https://github.com/ivan-tymoshenko/node-benchmarks
Benchmark library for NodeJs
https://github.com/ivan-tymoshenko/node-benchmarks
benchmark benchmark-framework benchmarking benchmarks javascript js node node-js nodejs performance performance-testing testing
Last synced: 5 months ago
JSON representation
Benchmark library for NodeJs
- Host: GitHub
- URL: https://github.com/ivan-tymoshenko/node-benchmarks
- Owner: ivan-tymoshenko
- License: mit
- Created: 2018-01-11T12:05:14.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-02-11T05:38:43.000Z (about 4 years ago)
- Last Synced: 2025-04-04T12:05:28.405Z (10 months ago)
- Topics: benchmark, benchmark-framework, benchmarking, benchmarks, javascript, js, node, node-js, nodejs, performance, performance-testing, testing
- Language: JavaScript
- Homepage:
- Size: 21.3 MB
- Stars: 6
- Watchers: 0
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Benchmark library for NodeJs
[](https://travis-ci.org/bugagashenkj/node-benchmarks)
[](https://www.codacy.com/app/bugagashenkj/node-benchmarks)
`node-benchmarks` is a library for testing the execution time of functions and comparing functions by speed.
## Features
- Tests synchronous and asynchronous functions
- Detects anomalies of testing and filters them out
- Compares functions by execution time
- Can run optimizing iterations before testing
- Tests each function in a separate process
- Test each function sequentially
- Gets optimization status of test function
## Speed test
`speed(caption, fns, [, options])`
- `caption` - test caption
- `fns` - array of test functions
- `options` - test options(optional)
- `count` - number of test iterations
- `startCount` - number of first optimizing iterations
- `anomalyPercent` - maximum possible percent of anomalies
Example:
```JavaScript
speed('Benchmark example',
[f1, f2, f3, [f4, f5]], {
count: 250000,
anomalyPercent: 5,
startCount: 0
});
```
- Synchronous test functions: `f1, f2, f3`
- Asynchronous test functions(callback-last / err-first function): `f4, f5`
## Contributors
- See github for full [contributors list](https://github.com/bugagashenkj/node-benchmarks/graphs/contributors)