[ 3 posts ]

Mahesh Guruwsamy

  • Username: mahesh_gkumar
  • Joined: Fri Sep 23, 2011 5:12 am
  • Posts: 2
  • Offline
  • Profile

YUI Profiler question

Post Posted: Fri Sep 23, 2011 5:26 am
+0-
Hi all,

I am trying to use the YUI profiler to profile AJAX calls. I took an e.g. from w3 schools and added the YUI profiler code around the ajax code. Here is the link to the code http://pastie.org/2579328. But what i am noticing is, it doesn't capture the end to end time, it looks like its capturing time only up-to the time the asynchronous call gets triggered and doesn't capture the end to end time. If i set the async attribute to false, i see the total end to end call. Any ideas on how to capture the end to end time in an async situation.

Mahesh

Mahesh Guruwsamy

  • Username: mahesh_gkumar
  • Joined: Fri Sep 23, 2011 5:12 am
  • Posts: 2
  • Offline
  • Profile

Re: YUI Profiler question

Post Posted: Mon Sep 26, 2011 4:29 am
+0-
Bump...anyone?

Joe Developer

  • Username: JoeDev
  • Joined: Sat May 09, 2009 12:54 am
  • Posts: 73
  • Twitter: joe_developer
  • IRC: unomi
  • Offline
  • Profile

Re: YUI Profiler question

Post Posted: Mon Sep 26, 2011 7:59 am
+0-
Probably only by using the 'stopwatch' functionality, see: http://developer.yahoo.com/yui/docs/YAH ... thod_start

When you are doing an async call the function is quite simply 'done' once it sends the ajax request.

You could insert the start call at the top of your function, and the end call just after the innerHTML injection.

In reality though, what you are actually profiling is the server - there are a number of good tools for that, like Apache Bench or others here: http://en.wikipedia.org/wiki/Web_server_benchmarking
  [ 3 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum