I have custom allura tools and would like to add Timer('sqlalchemy-query', sqlalchemy.orm.query.Query, '__iter__'),
to AlluraTimerMiddleware to measure the sqlalchemy calls. Perhaps this is generic enough to put in Allura within an import trap, but it'd be nice if external code could add their own Timers.
{allura,forgehg,forge-classic}:db/6699
For anyone who finds this, I ended up using
Timer('sqlalchemy', sqlalchemy.engine.base.Connection, '_execute_context')
See http://www.sqlalchemy.org/trac/wiki/UsageRecipes/Profiling for more