A look at Khan/gae_mini_profiler: 269 stars on GitHub, written primarily in Python. A ubiquitous mini-profiler for Google App Engine, inspired by mvc-mini-profiler
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
gae_mini_profiler is a quick drop-in WSGI app that provides ubiquitous profiling of your existing GAE projects. It exposes RPC statistics and CPU 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, so you can use this profiler to learn about production performance without stressing about slowing users down. See screenshots and features below.
This project is heavily inspired by the Stack Exchange team's impressive mini-profiler.
See it in action
Screenshots
Getting Started
Features
Dependencies
Bonus
FAQ
See it in action
Play around with a demo App Engine applications with gae_mini_profiler enabled at http://mini-profiler.appspot.com.
Screenshots
All profiled pages have total milliseconds in corner, which can be expanded...
...to show more details...
...about remote procedure call performance...
...or CPU profiler output.
Choose between an instrumented CPU profiler (above) or a sampling profiler (below).
Ajax requests and redirects are also profiled and added to the corner of your page.
Any Python logging module output is also available for easy access.
Getting Started
Download this repository's source and copy the gae_mini_profiler/ folder into your App Engine project's root directory.
Add the following two handler definitions to app.yaml:
Modify your template to include our javascript and stylesheets just before your ending body tag.
There is a profiler_includes() function in gae_mini_profiler.templatetags that spits out the right code for these scripts and stylesheets.
Using any template engine of your choice? Call this function at the end of your template:
...
{% profiler_includes %}
</body>
</html>
Note that these resources will not be loaded on requests when the profiler is disabled, so you don't need to worry about extra HTTP requests slowing down your users.
Using Django? You can register a simple_tag to expose this to your templates:
Using anything else to generate your HTML? Just find some way to spit the results of profiler_includes() into your HTML. Doesn't have to be anything fancy.
You're all set! Now you just need to choose when you want to enable the profiler by overriding a simple function. By default it's enabled on the dev server and disabled in production. To enable it for App Engine admins in production, add the following to appengine_config.py:
def gae_mini_profiler_should_profile_production():
from google.appengine.api import users
return users.is_current_user_admin()
In appengine_config.py you can override both of the following...
...with any logic you want to choose when the profiler should be enabled.
Features
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
Choose from either an instrumented or sampling CPU profiler to quickly figure out where your requests are spending time
Dependencies
jQuery >= 1.7 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.
Bonus
gae_mini_profiler is currently in production use at Khan Academy. If you make good use of it elsewhere, please lemme know.
FAQ
What's the license? MIT licensed. There is also code from the Speedscope project whose license is at static/speedscope/LICENSE.
I had my appstats_RECORD_FRACTION variable set to 0.1, which means only 10% of my queries were 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 appengine_config.py 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
How active is development on Khan/gae_mini_profiler?
The most recent commit recorded on Khan/gae_mini_profiler was 7.6 years ago, based on the GitHub push timestamp. The repository has 39 forks — one of the better signals of community interest.
How many stars does Khan/gae_mini_profiler have?
Khan/gae_mini_profiler has 269 GitHub stars — refresh the page for the live number, or check github.com/Khan/gae_mini_profiler. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is Khan/gae_mini_profiler open source?
TopGit's metadata for Khan/gae_mini_profiler does not record a license. Most public repositories on GitHub ARE open source, but the exact terms vary — verify by opening the LICENSE file directly.
What is Khan/gae_mini_profiler?
Khan/gae_mini_profiler (Khan/gae_mini_profiler) is a Python project on GitHub. From the project's own README: A ubiquitous mini-profiler for Google App Engine, inspired by mvc-mini-profiler
Where do I read more about Khan/gae_mini_profiler?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/Khan/gae_mini_profiler is the definitive source.
Read full README in the tab above.
Is gae_mini_profiler worth your time?
ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of gae_mini_profiler.