Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A ubiquitous mini-profiler for Google App Engine, inspired by mvc-mini-profiler
JavaScript CSS Python HTML
Tree: 507b6782f9

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Google App Engine Mini Profiler

gae_mini_profiler is a quick drop-in WSGI app that provides ubiquitous profiling of your existing GAE projects. It exposes both RPC statistics and standard profiling output for users of your choosing on your production site. Only requests coming from users of your choosing will be profiled, and others will not suffer any performance degradation. See screenshots and features below.

This project is heavily inspired by the impressive mvc-mini-profiler.

gae_mini_profiler is MIT licensed.


You can play around with one of GAE's sample applications with gae_mini_profiler enabled for all users via


All profiled pages have total milliseconds in corner, which can be expanded... show more details...

...about remote procedure call performance...

...or standard profiler output.

Ajax requests are also profiled and details made available as they are received.

Any Python logging module output is also available for easy access.

Getting Started

  1. Download this repository's source and copy the gae_mini_profiler/ folder into your App Engine project's root directory.
  2. Add the following two handler definitions to app.yaml:
    – url: /gae_mini_profiler/static
      static_dir: gae_mini_profiler/static
    – url: /gae_mini_profiler/.*   script: gae_mini_profiler/
  3. Modify the WSGI application you want to profile by wrapping it with the gae_mini_profiler WSGI application:
    # Example of existing application
    application = webapp.WSGIApplication(...existing application...)
    # Add the following from gae_mini_profiler import profiler application = profiler.ProfilerWSGIMiddleware(application)
  4. Insert the profiler_includes template tag below jQuery somewhere (preferably at the end of your template):
        ...your html...
        {% profiler_includes %}
  5. You're all set! Just choose the users for whom you'd like to enable profiling in gae_mini_profiler/
    # If using the default should_profile implementation, the profiler
    # will only be enabled for requests made by the following GAE users.
    enabled_profiler_emails = [


  • Production profiling without impacting normal users
  • Easily profile all requests, including ajax calls
  • Summaries of RPC call types and their performance so you can quickly figure out whether datastore, memcache, or urlfetch is your bottleneck
  • Redirect chains are tracked -- quickly examine the profile of not just the currently rendered request, but any preceding request that issued a 302 redirect leading to the current page.
  • Share individual profile results with others by sending link
  • Duplicate RPC calls are flagged for easy spotting in case you're repeating memcache or datastore queries.
  • Quickly sort and examine profiler stats and call stacks


  • jQuery must be included somewhere on your page.
  • (Optional) If you want the fancy slider selector for the Logs output, jQuery UI must also be included with its Slider plugin.


gae_mini_profiler is currently in production use at Khan Academy as well as WebPutty. If you make good use of it elsewhere, be sure to let me know.


  1. I had my appstats_RECORD_FRACTION variable set to 0.1, which means only 10% of my queries where getting profiles generated. This meant that most of the time gae_mini_profiler was failing with a javascript error, because the appstats variable was null.

    If you are using to customize Appstats behavior you should add this to the top of your "appstats_should_record" method.

    def appstats_should_record(env):
        from gae_mini_profiler.config import should_profile
        if should_profile(env):
            return True
Something went wrong with that request. Please try again.