frenchie
frenchie

Reputation: 52027

javascript performance functionality

I'm not sure if such tool exists but if it does, please point me to it.

It works like this: you play with the UI of you page for a few minutes and then you can see how many times the browser spent executing each javascript function and how much time does each function take to execute on average.

So for instance, we could say function X is used a lot and takes a long time to execute.

I use chrome so may be other browsers do this. Let me know.

Upvotes: 0

Views: 106

Answers (3)

thecodejack
thecodejack

Reputation: 13379

1) JSLitmus is a lightweight tool for creating ad-hoc JavaScript benchmark tests

http://www.broofa.com/Tools/JSLitmus/

is best and calculates for all browsers

2) Firebug, Chrome will also help.

3) JSPerf (dont have the link) will also help you check performance online

4)

and if you are not happy with any ofthose..do it urself...

write the function call between these

console.time('timerName');

// Your javascript function here 

console.timeEnd('timerName');

This one will work only in developer tools like firebug and chrome console but very easy to deal with it.

Upvotes: 1

Farzher
Farzher

Reputation: 14593

In Chrome

CTRL + SHIFT + I

Timeline tab

Hit the circle on the bottom left that says record

Mess with your site

Stop recording

Upvotes: 0

Joseph
Joseph

Reputation: 119877

chrome's developer tools has what you call "Timeline".

  1. load your page then CTRL + SHIFT + I
  2. go to Timeline tab
  3. hit the record button (found on the lower left, it's a circle).

then it will record your actions, page events, etc.

Upvotes: 1

Related Questions