Tools for profiling.

See Profiling.


View that handle ‘/_profile/ping’

It simply reply ‘ping’, without requiring connection to the repository. It is a useful as a comparison point to evaluate the actual overhead of more costly views.


View that handle ‘/_profile/cnx’

Same as ping(), but it first ask for a connection to the repository. Useful to evaluate the overhead of opening a connection.


cubicweb.pyramid.profile.wsgi_profile(app, filename='', dump_every=50)[source]

A WSGI middleware for profiling

It enable the profiler before passing the request to the underlying application, and disable it just after.

The stats will be dumped after dump_every requests

  • filename – The filename to dump the stats to.

  • dump_every – Number of requests after which to dump the stats.