racker/node-rackspace-shared-utils — pull request #13 by jirwin (2013-12-23 09:20:30+00:00)
Title: feature(instruments): Add a function to automatically time arbitrary functions

The immediate use case I have in mind is exporting functions from modules to always be timed when they are called.

```javascript
var timeFunction = require('rackspace-shared-utils/lib/instruments').timeFunction;

function expensiveFunction(foo, bar, callback) {
... do some stuff ...
callback();
}

exports.expensiveFunction = timeFunction(expensiveFunction);
```