0.1.2 • Published 8 years ago
promise-profiler v0.1.2
profile-profiler
Track promise & non-promise execution time
Install
npm install profile-profiler --saveUsage
Patch function
fn = profiler.patch(fn, 'name'); //name can be omit to use function namePatch object
profiler.patch(obj, 'name'); //name can be omit to use class nameTurn profiler on/off
profiler.active = true; //or false for offGet report
let result = profiler.report();
//[
// { name: 'fnName', sum: 1000, min: 20, max: 150, avg: 100, count: 10 }
//]