Skip to content

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.

Notifications You must be signed in to change notification settings

saulabs/jquery.profiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Basics

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.

Syntax

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.

$.profiler.time() and $.profiler.timeEnd() are mimic to console.time() and console.timeEnd() introduced in Firebug (http://getfirebug.com/logging).

Standard console

As a shorthand you can also use standard console object as:

  • console.time(name)
  • console.timeEnd(name)

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published