How to access chrome profiling programmatically How to access chrome profiling programmatically google-chrome google-chrome

How to access chrome profiling programmatically


You can profile a script in google chrome programmatically using the following code

console.profile("MyProfile");// Enter name of script hereconsole.profileEnd();

"MyProfile" is the name of the profile which will be created.

Source:

http://blog.codestars.eu/2011/profiling-with-webkit/

You could get the time for a function / code snippet to execute by using a combination of console.time()and console.timeEnd()