You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/09/12 00:23:46 UTC

[GitHub] timifasubaa closed pull request #5862: fix sqllab logging

timifasubaa closed pull request #5862: fix sqllab logging
URL: https://github.com/apache/incubator-superset/pull/5862
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/superset/sql_lab.py b/superset/sql_lab.py
index fff42718c0..8e2cafcd97 100644
--- a/superset/sql_lab.py
+++ b/superset/sql_lab.py
@@ -100,7 +100,7 @@ def execute_sql(
     user_name=None, session=None, start_time=None,
 ):
     """Executes the sql query returns the results."""
-    if store_results:
+    if store_results and start_time:
         # only asynchronous queries
         stats_logger.timing(
             'sqllab.query.time_pending', utils.now_as_float() - start_time)
diff --git a/superset/views/core.py b/superset/views/core.py
index e0260d17bf..e021709434 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -2338,7 +2338,7 @@ def results(self, key):
         blob = results_backend.get(key)
         stats_logger.timing(
             'sqllab.query.results_backend_read',
-            read_from_results_backend_start - utils.now_as_float(),
+            utils.now_as_float() - read_from_results_backend_start,
         )
         if not blob:
             return json_error_response(


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org