0

I am trying to make firefox automatically visit a set of webpages and report to me somehow how much it took to load each page. My best option so far seems to be the ChickenFoot extension. The following program however always outputs the same load time (3 milliseconds):

function end_timer(start){
    stop = new Date()
    output("Load time:" + parseInt(stop.getTime() - start.getTime()))
}


start = new Date()
go("facebook.com")
whenLoaded(end_timer(start), this)

Does anyone have any ideas? Thanks !

skaffman
  • 398,947
  • 96
  • 818
  • 769
nikifor
  • 31
  • 3
  • 1
    Why don't you use profiler in Firebug instead? It's designed to measure things like this. – RaYell Dec 15 '09 at 12:21
  • I haven't really used Firebug but does it have the option of automatically visiting webpages like chickenfoot does? – nikifor Dec 15 '09 at 14:42

1 Answers1

0

Ok ppl, I found it.. I am just pasting the corrected code here in case someone wants to use it in the future:

function end_timer(start){
    stop = new Date()
    output("Load time:" + parseInt(stop.getTime() - start.getTime()))
}


start = new Date()
go("facebook.com")
wait()
end_timer(start)
nikifor
  • 31
  • 3