Timing JavaScript execution with Fiddler

I have been doing some performance debug work with fiddler recently and I wanted to add some timers to the java script which I am debugging via using an auto responder.

For the JavaScript I am interested in I added the function below at the top of the script.

function now()
{
var d = new Date();
return (d.getTime());
}

At the beginning of the function I want to time I added

var time = now();

At the end of the function I added

alert(“Time to execute = ” + (now()-time)+”);

Advertisement

About loadtestguy

Just a performance tester that wants to record the things I should remember about LoadTesting
This entry was posted in Performance Engineering, Uncategorized. Bookmark the permalink.

One Response to Timing JavaScript execution with Fiddler

  1. loadtestguy says:

    Nice post by Dyna Trace about future timing points in the next generation of browsers.

    http://blog.dynatrace.com/2012/02/15/specification-proposal-for-javascript-timing-in-browsers/

    Still jam tomorrow!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s