Nurturing Pluto's Martians
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

ueshi

1.2.1 • Public • Published

ueshi Build Status

NPM

NPM

Benchmarking

var Ueshi = require('ueshi');
 
function Foo() {}
 
Foo.prototype.bar = function(cb) {
    setTimeout(function() {
        cb(42)
    }, 1000);
};
 
var Wrapper = new Ueshi();
var foo = new Foo();
 
Wrapper.wrap(foo);
 
Wrapper.on('invoke', function(event) {
    console.log(event);
    //event: {elapsed: 1000ms, name: 'bar', subject: 'Foo'}
});
 
foo.bar(function() {
    console.log(arguments);
});

The Ueshi-Constructor accepts a options hash with the following parameters:

  • excludePrivate excludes private methods from benchmarking. Method names starting with an _ are considered private.

Ueshi?

An alien race from The legend of ZERO.

install

npm i ueshi

Downloadsweekly downloads

4

version

1.2.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar