Start and Stop Profiling from Javascript in Chrome

You can!

An example:

   if (window.console && window.console.profile) {
     console.profile("label for profile");
     // insert code to profile here,
     // all function calls will be profiled
     console.profileEnd();
   }

It also works on Safari, and with Firebug in Firefox.

Note: You can’t use profile to time code that does not make a function call: if your code above is simply a for loop then the profiler won’t find anything to profile. Use console.time() and console.timeEnd() to benchmark pure loops or code that does not call a function.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)