METATEST
is a library for testing the execution time of functions and comparing functions by speed.
- 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
metatest.speed(caption, fns, [, options])
caption
- test captionfns
- array of test functionsoptions
- test options(optional)count
- number of test iterationsstartCount
- number of first optimizing iterationsanomalyPercent
- maximum possible percent of anomalies
Example:
metatest.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
- See github for full contributors list