title: How can I record SQLAlchemy generated SQL and query execution times?
body: <p>I'm trying to store the SQL queries generated by SQLAlchemy, and how long each one takes to run. I'm using an event listener to store the SQL:</p>
  
  <pre><code>statements = []
  
  @listens_for(DBSession.get_bind(), "before_cursor_execute", named=True)
  def before_cursor_execute(**kw):
      statements.append(kw['statement'])
  </code></pre>
  
  <p>Can I use the same event listener somehow to store execution time, or should I be using something else?</p>