A feature that has been recently added to Zato in git and will be released in version 2.0 is an HTTP request profiler.

To start it, set profiler.enabled to True in server.conf:

{% gist 6405544 %}

Assuming a server is running on localhost using default settings, visiting http://localhost:17010/zato-profiler, like in the screenshot below, can quickly help you understand:

  • what functions and methods take the most time
  • what parts of code are most commonly used
  • who are the callers of a given function/method
  • what functions/methods given code is invoking
Screenshot

The profiler is exposed using the repoze.profile library which is a reusable WSGI middleware that can be embedded in other projects too.