Re: [sqlalchemy] timing queries ?

2013-09-17 Thread Michael Bayer
there's a modern recipe at: http://www.sqlalchemy.org/trac/wiki/UsageRecipes/Profiling but yeah, thats ConnectionEvents. what's the issue there, you need how long result fetching takes ? On Sep 17, 2013, at 2:28 PM, Jonathan Vanasco wrote: > is there a currently recommended approach ? > >

Re: [sqlalchemy] timing queries ?

2013-09-17 Thread Jonathan Vanasco
On Tuesday, September 17, 2013 3:59:31 PM UTC-4, Michael Bayer wrote: > > there's a modern recipe at: > http://www.sqlalchemy.org/trac/wiki/UsageRecipes/Profiling > > but yeah, thats ConnectionEvents. what's the issue there, you need how > long result fetching takes ? > thanks! yeah. Some o

Re: [sqlalchemy] timing queries ?

2013-09-17 Thread Jonathan Vanasco
it might be better for the recipe to be: logger = logging.getLogger("sqlalchemy.engine.base.Engine") logger.setLevel(logging.INFO) logger.info("Query Complete! Total Time: %f" % total) This will correlate it to the existing sql statement logging ( which is a way more natural place

[sqlalchemy] timing queries ?

2013-09-17 Thread Jonathan Vanasco
is there a currently recommended approach ? looking through the backcatalog of q&a (from 2008-2010) , it seems like the options are: - manually look at debug data , subtract timestamps for a general idea - write something with ConnectionEvents ( originally ConnectionProxy ) for now, i just want