Find file
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (14 sloc) 525 Bytes

Underscore profile

Benchmark your functions.


Wrap your functions with _.profile and call them normally.

your_function = _.profile("Your Function Description", your_function);

Whenever you want to see results, you can call:


It will give you something like this:

Thread.render: Called 6 times. Avg: 23 ms. Max: 46 ms. Total: 0.141 s.


Made by Pablo Villalba (@micho) for Teambox