AppStats

It is important to know how your application is performing. A Google App Engine application mainly calls various API methods that result in RPC calls, which effectively are network calls. If you have data of what kind of calls are being made, where and what calls are the most time-consuming, you can optimize, tweak, or structure your code in accordance to make optimal use of resources.

That's exactly where the RPC profiling comes in, which is also known as AppStats. To enable it, there are two steps to it:

  • Enabling the recording of events
  • Enabling the user interface to browse it

To enable it, you have to add a WSGI middleware to your application that will record various statistics. In case of webapp2, that's simple. You can simply do it like ...

Get Mastering Google App Engine now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.