Maybe this could help: def timer(output=log.debug):
@decorator def wrapper(fn, *a, **kw): start = time.time() result = fn(*a, **kw) end = time.time() delta = round(end - start, 3) output('Time needed to execute "' + fn.__name__ + '()": ' + str(delta) + 's') return result return wrapper On 6 sep., 23:32, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Sep 6, 2008, at 3:46 PM, qvx wrote: > > > > > On Aug 31, 11:36 pm, Michael Bayer <[EMAIL PROTECTED]> wrote: > >> for a more comprehensive solution > >> write some timing code around ConnectionProxy, docstring > >> athttp://www.sqlalchemy.org/docs/05/sqlalchemy_interfaces.html#docstrin > >> ... > > > What would be the equivalent way in 0.4 version of sqlalchemy > > you would have to monkeypatch the "execute()" method on the Connection > class. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---