Didier,

your idea is good but can/want execute activity on a task. I need simple
approach: run X async urlfetch, wait for end of execution and store
execution time of each fetch.

I've opened a feature request on the issue tracker:
http://code.google.com/p/googleappengine/issues/detail?id=4476


   Fabrizio


On Sun, Jan 30, 2011 at 8:28 AM, Didier Durand <[email protected]>wrote:

> Hi,
>
> You're right: async url fetch doesn't seem to provide any way to
> measure fetch time.
>
> Then, I have a proposal: why don't you schedule a task per fetch, this
> task will then do a regular synchronous url fetch for which measuring
> will be easy.
>
> So, your original servlet / task will schedule as many tasks as you
> have fetches and wait via a loop of Thread.sleep() until all fetches
> are done and their results (incl fetch time) written somewhere
> (datastore / memcache) that the original servlet / task can access to
> complete the work.
>
> The only question though: can the application afford to launch those
> tasks as they will incurr some overhead : some tenths of milliseconds
> of cpu to schedule a task and run it + cpu time to write result to
> cacche or ds in order to be shareable with originator.
>
> If not acceptable, I hope it will at least give you some other ideas
> to follow
>
> regards
>
> didier
>
> On Jan 29, 9:50 am, Fabrizio Accatino <[email protected]> wrote:
> > Hello,
> >
> > I'm playing with async urlfetch. My ispiration was Ikai athttp://
> ikaisays.com/2010/06/29/using-asynchronous-urlfetch-on-java-ap...
> >
> > I run some request in parallel. All works fine. But now I'd like to get
> info
> > about execution time of each request. The target URLs I call are
> different
> > so the response time are very different.
> > I read the documentation but HTTPResponse does not expose a "execution
> > duration" or similar value.
> >
> > Any idea?
> >
> > Fabrizio
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine-java%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" 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 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to