john-bodley commented on a change in pull request #5736: [sqllab]More granular
sqllab logging
URL:
https://github.com/apache/incubator-superset/pull/5736#discussion_r216522530
##########
File path: superset/sql_lab.py
##########
@@ -172,11 +174,13 @@ def handle_error(msg):
cursor = conn.cursor()
logging.info('Running query: \n{}'.format(executed_sql))
logging.info(query.executed_sql)
+ query_start_time = utils.now_as_float()
db_engine_spec.execute(cursor, query.executed_sql, async_=True)
logging.info('Handling cursor')
db_engine_spec.handle_cursor(cursor, query, session)
logging.info('Fetching data: {}'.format(query.to_dict()))
data = db_engine_spec.fetch_data(cursor, query.limit)
+ stats_logger.timing('time_in_database', utils.now_as_float() -
query_start_time)
Review comment:
I wonder if there's a better (more descriptive) name than
`time_in_database`? May `time_executing_query`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]