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/10 17:32:00 UTC

[GitHub] timifasubaa closed pull request #5844: add timing to stats logger

timifasubaa closed pull request #5844: add timing to stats logger
URL: https://github.com/apache/incubator-superset/pull/5844
 
 
   

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/stats_logger.py b/superset/stats_logger.py
index aaab8a11f1..e16ecbb587 100644
--- a/superset/stats_logger.py
+++ b/superset/stats_logger.py
@@ -29,6 +29,9 @@ def decr(self, key):
         """Decrement a counter"""
         raise NotImplementedError()
 
+    def timing(self, key, value):
+        raise NotImplementedError()
+
     def gauge(self, key):
         """Setup a gauge"""
         raise NotImplementedError()
@@ -44,6 +47,11 @@ def decr(self, key):
             Fore.CYAN + '[stats_logger] (decr) ' + key +
             Style.RESET_ALL))
 
+    def timing(self, key, value):
+        logging.debug((
+            Fore.CYAN + '[stats_logger] (timing) {key} | {value} ' +
+            Style.RESET_ALL).format(**locals()))
+
     def gauge(self, key, value):
         logging.debug((
             Fore.CYAN + '[stats_logger] (gauge) '
@@ -63,6 +71,9 @@ def incr(self, key):
         def decr(self, key):
             self.client.decr(key)
 
+        def timing(self, key, value):
+            self.client.timing(key, value)
+
         def gauge(self, key):
             # pylint: disable=no-value-for-parameter
             self.client.gauge(key)


 

----------------------------------------------------------------
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