jquery.profiler allows you to profile your javascript code on browsers without a full support of console.time and console.timeEnd methods such as Mobile Safari.
It is compatible with both jQuery and Zepto frameworks.
There are 3 basic methods you can use to profile:
- $.profiler.lasts(function, [name])
- $.profiler.time([name])
- $.profiler.timeEnd([name])
All these methods outputs into standard console in milliseconds.
$.profiler.lasts(function) takes a function as argument which is useful to profile query selectors etc.
As a shorthand you can also use standard console object as:
- console.time(name)
- console.timeEnd(name)