perf-utils-js

1.0.1 • Public • Published

Coverage Status Build Status

perf-utils

Few functions to measure performance and other useful stuff in a node.js app. Available on npm.js!

npm i perf-utils-js

Functions

memLog

// returns value of current heap used by node.js process in MB
function memLog(): number

profileFn

// returns a log of the average execution time of a given function
// calculated over 'iter' iterations
function profileFn(fn: CBFuncVariadicAnyReturn, iter?: Number): ProfileFnLog

sizeof

// returns rough estimate of B used by an object
function sizeof(obj: any): number

compareFnProfile

// compares N fuctions by average execution time over 'iter' iterations
// returns fastest function's log and a list of all the logs calculated
function compareFnProfile(iter: number, ...functions: CBFuncVariadicAnyReturn[]): CompareFnLog;

Package Sidebar

Install

npm i perf-utils-js

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

15.5 kB

Total Files

13

Last publish

Collaborators

  • mrampazz