On 05/10/2017 10:22 PM, Jonathan Vanasco wrote:


On Wednesday, May 10, 2017 at 8:09:22 PM UTC-4, Mike Bayer wrote:

    no return value needed


perfect

    you mean, the commit() method itself how long does that take?   You'd
    probably do a time.time() check before and after calling the method (or
    use timeit.timeit to do the same).


ok, so it's not supported as time-able via listeners provided in an activated plugin.

the library i'm extending is using before/after execute events to start/stop timing. i was hoping i could catch the commit and somehow time it via a listener automatically.

well the hooks don't really "box" the commit action, or the other actions, so if that's what you mean then I'm not sure the event hooks are set up to achieve that in most cases. You can certainly time between events, like time from begin to commit, but that's including what the application is doing.





--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com <mailto:sqlalchemy+unsubscr...@googlegroups.com>. To post to this group, send email to sqlalchemy@googlegroups.com <mailto:sqlalchemy@googlegroups.com>.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

--
SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to