Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

The Gevent Request Profiler enables the discovery of blocking/non-yielding code in request-handling servers implemented with the Gevent networking library.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples Add built-in gevent.pywsgi support. February 04, 2011
Octocat-spinner-32 tellapart Add built-in gevent.pywsgi support. February 04, 2011
Octocat-spinner-32 .gitignore Initial commit. February 02, 2011
Octocat-spinner-32 LICENSE Initial commit. February 02, 2011
Octocat-spinner-32 README
Octocat-spinner-32 setup.py Initial commit. February 02, 2011
README
=======================
Gevent Request Profiler
=======================

The Gevent Request Profiler enables the discovery of blocking/non-yielding
code in request-handling servers implemented with the Gevent networking library
(http://www.gevent.org/).

Culprits may include blocking I/O (e.g., file I/O, native I/O, or non-
monkey-patched socket requests) and CPU-intensive code.

Unlike the cProfile module, it is not a deterministic profiler that precisely
measures the run-times of all function calls. Rather, it identifies
'execution spans', intervals during which greenlets do not cooperatively yield
to other greenlets, for a set fraction of requests.

The profiler works with gevent.wsgi and gevent.pywsgi servers out of the box,
but it's straightforward to add support for other server types. See the
Profiler doc comment in gevent_profiler.py for details.

Developed by TellApart (http://www.tellapart.com) and licensed under the
Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0).

============
Installation
============

To install, run:

  sudo python setup.py install

===============
Getting Started
===============

The best way to get a feel for the profiler is to bring up a server, make a
few requests, and watch the greenlet transitions happen.

You can get started by running:

  examples/wsgi_example.py

Toggle between gevent.wsgi and gevent.pywsgi at the top of the script.
Something went wrong with that request. Please try again.