dpgaspar commented on a change in pull request #13911:
URL: https://github.com/apache/superset/pull/13911#discussion_r607087221
##########
File path: superset/reports/commands/alert.py
##########
@@ -145,7 +146,15 @@ def _execute_query(self) -> pd.DataFrame:
limited_rendered_sql =
self._report_schedule.database.apply_limit_to_sql(
rendered_sql, ALERT_SQL_LIMIT
)
- return self._report_schedule.database.get_df(limited_rendered_sql)
+ start = default_timer()
+ df = self._report_schedule.database.get_df(limited_rendered_sql)
+ stop = default_timer()
+ logger.info(
+ "Query for %s took %.2f ms",
+ self._report_schedule.name,
+ (stop - start) * 1000.0,
+ )
Review comment:
Adding a log info with the time a query took to execute
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]