Google I/O 2010 - Appstats - instrumentation for App Engine

Google for Developers · 16K views · 2010 · 59:31

Open on YouTube

Software performance & optimizationCloud, DevOps & reliabilityTesting, debugging & developer toolstalkdated

Why Stack Overflow recommends it

Stack Overflow users link it when explaining what Appstats measures, how datastore RPC calls behave, and how to use the tool to find and fix slow App Engine requests.

Recommended by 3 people across 3 different months, 2010 to 2012.

What it is

A Google I/O 2010 session in which Guido van Rossum presents Appstats, a userland library for Python and Java App Engine apps that hooks into the runtime to record RPC calls to services like the datastore. It walks through the browsable stats UI and common optimizations for typical findings.

What people said

Strong rec Ezra · 2011-03 · Stack Overflow · on “What do the Appstats values mean?”

This is my understanding: real is the time as measured by a clock. This is time elapsed. api usage is the time spent on RPC's, such as accessing the datastore. This is not truly a time, but some amount of computing resources measured in time. cpu usage is the time spent executing code. Again, it's not really a time but resource usage as measured in time. api is different than RPC Total only in that RPC total shows the amount of clock time that has elapsed during the api time. It's possible to do 388ms of computation in 63ms because of parallelism. So, RPC Total shows both clock-time spent, as well as resoure usage. Grand Total is the total wall time (the same as real ), with the sum of cpu ,

Recommends Xion · 2011-09 · Stack Overflow · on “What is a good resource for understanding GAE datastore architecture?”

You could start with presentation from Google I/O: App Engine Datastore Under The Covers [LINK] The presentation on Appstats [this video] also gives some insight into how datastore (and RPC calls in general) work, as well as giving some optimization tips.

Recommends allyourcode · 2012-07 · Stack Overflow · on “Titan Stats for java GAE”

Try appstats [LINK] . Also available for Python [LINK] . Another helpful resource for appstats is this recorded presentation [this video] by Guido Van Rossum at Google I/O 2010.

Cites Jason Hall · 2010-06 · Stack Overflow · on “Database design - google app engine”

As you've noticed, this design doesn't scale. It requires 4 (!!!) DB queries to render the page. That's 3 too many :) The prevailing notion of working with the App Engine Datastore is that you want to do as much work as you possibly can when something is written, so that almost nothing needs to be done when something is retrieved and rendered. You presumably write the data very few times, compared to how many times it's rendered. Normalization is similarly something that you seem to be striving for. The Datastore doesn't place any value in normalization -- it may mean less data incongruity, but it also means reading data is muuuuuch slower (4 reads?!!). Since your data is read much more ofte

Cites Metalshark · 2011-08 · Stack Overflow · on “Extending Google Appstats”

After watching Guido's Google IO talk [this video] and hearing the mention that it can be extended (thus providing an instrumentation mechanism for recording your own events) I am still at a loss on how this would be done. The functions are all for handling RPC and not simply start/stop calls an expensive function (or wrapper) can make. Has anyone extended the library, more to the point in a safe manner that doesn't require overriding the original?