On Wednesday, January 4, 2012 8:35:36 PM UTC+1, Andrew MacNaughton wrote: > > Hi Guys > > Have been using firebug for quite some time. It has made my job alot > easier that's for sure. > I am looking for some advice. I need to "time" a webservice call from > a google gadget. Something identical to what you have in the console > panel of fb would be ideal. Is there anyway to access this thru code > or get a snippet of the code that you use to acheive this. > The XHR Spy (aka "Show XMLHTTPRequests" option in the console) is implemented here: http://code.google.com/p/fbug/source/browse/branches/firebug1.9/content/firebug/net/spy.js
The code listens for http-on-modify-request, http-on-examine-response (http-on-examine-cached-response) event and also registers "load", "abort" and "error" listeners to the XHR object to measure timing. You could also use nsIHttpActivityObserver & Distributor to get more detailed timings (used by the Net panel) See here: http://code.google.com/p/fbug/source/browse/branches/firebug1.9/content/firebug/net/httpActivityObserver.js Also does it measure the time it takes from client to server or is it > client to server via google somehow??? > I am not sure I understand this question. But using nsIHttpActivityObserver you can get timing for various HTTP request phases: DNS lookup, connecting, sending, waiting, receiving Honza > Thanks in advance. > > Andy -- You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at https://groups.google.com/forum/#!forum/firebug
