The usage of Appstats on the development environment is to determine
if the request is not performing to many RPC calls.
Doing transactions in a loop is a nice example that might be optimized.

Don't compare the execution times of the development and production.
They have very different implementations of the Datastore, and
sometimes the production has to start a new app instance.

For some RPC calls on the production server the API time (red bar) is
larger then the wall-clock time (blue bar) because some
queries/puts/get/fetch calls can be parallelized. The red bar is the
sum of the processing cycles combined.

The gaps in between the blue bars is the time spend in the code you
have written that are not API calls. For example to construct a list
of db.Key's you want to get.
Those ms added together and converted to 1.2 GHz processor are the
CPUms in the result.

2010/12/7 Fredrik Bonander <carl.fredrik.bonan...@gmail.com>:
> Thanks for your (both of you) info.
> In my mission to improve my application I'm on a constant hunt for
> milliseconds. But while improving on every request I find it kinda strange
> that the difference would be so huge from my development server.
> In appstats the trouble some request that show's "3275ms 9140cpu_ms
> 7296api_cpu_ms" is 1 memcache call, 4 db.RunQuery and 5 db.Get and in my
> development it's about 400ms. When thinking about it I would think that the
> red bar (the longest one) is time spent waiting on the request to return.
> Especially since the red bar is not present in appstats on my development
> server.
> I think it would make sense or that for some odd reason my code is so bad
> that would run that much slower on the production servers.
> Another thing that bugs me a bit is that this is my third time asking about
> how CPU/API time is calculated in different contexts but never any answers
> from Santa's Elves (in sprit of keeping to the metaphor).
> If I'm right (about the red bars) why the long waiting times for some
> requests ?
> It would be great to get some clarification in how this works so we as
> developers can know how to proceed. I don't want to spend x amount of hours
> optimizing my code if I can't to anything to help improve the CPU/API times.
> ..fredrik
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to