Skip to content

jesus9ias/timux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

timux

Test execution time of your Javascript code.

Purpose

timux is a simple module for calculate the execution time of any javascript code by using simple functions.

Install

npm install timux

Methods

At this moment there are three methods available:

  • init()
  • end()
  • report()

In all of this methods you must give a key that identify the part of code that you are watching.

// Initializes the test with a key
timux.init('home');
// Ends the operation
timux.end('home');
// Gets the time in milliseconds.
timux.report('home');

You can execute this methods with different key in the same file for testing different parts of code.

Sample

var tx = require('timux');
tx.init('test');
setTimeout(function(){
  tx.end('test');
  tx.report('test');
},2153);

Contributions

All pull requests are welcome.

About

Test execution time of your Javascript code

Resources

License

Stars

Watchers

Forks

Packages

No packages published