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!

Readme

Keywords

none

Package Sidebar

Install

npm i perftimer

Weekly Downloads

0

Version

1.0.8

License

MIT

Unpacked Size

26.7 kB

Total Files

14

Last publish

Collaborators

  • benedictchen