npm

Need private packages and team management tools?Check out npm Orgs. »

perftimer

1.0.8 • Public • Published

PerfTimer

Build Status

A simple performance recorder. Please note that debugMode must be on or else nothing will happen.

Usage:

 
PerfTimer.debugMode(true);  // <-- Important!
PerfTimer.start(`My random task`);
doStuff();
PerfTimer.stop(`My random task`);
 
// Write the results to file (/tmp/performance.log) and console.
PerfTimer.printReport('/my/path/performance.log');
 

PerfTimer

  • static start(name: String)
    • Starts timing a session of a specific name.
  • static stop(name: String)
    • Stops timing a session with a specific name.
  • static reset()
    • Clears all previous sessions.
  • static printReport(filePath: String)
    • Prints the reports to a file at the path defined.

Development

  • Dev-mode - gulp devwatch - this mode will watch your files, run tests, lint your code, and compile them as you code.
  • Tests - gulp test or npm test

Created by Benedict Chen. If you like it, you can buy me a beer with PayPal.

Donate via Paypal

If you enjoy this repo, please support me. Donate

Please support us!

Keywords

none

install

npm i perftimer

Downloadsweekly downloads

1

version

1.0.8

license

MIT

last publish

collaborators

  • avatar
Report a vulnerability