(self, service)
Send acquired stats to logdb.
Send acquired stats to logdb.
Send acquired stats to logdb .
def flush_stats(self, service):
        """Send acquired stats to logdb."""
        res = []
        for k, v in self.stat_cache.items():
            res.append("%s: %s" % (k, str(v)))
        if len(res) > 0:
            logmsg = "{%s}" % ", ".join(res)
            self.send_to_logdb(service, "INFO", logmsg)
        self.stat_cache = {}
        self.last_stat_flush = time.time()
def flush_stats ( self , service ) : res = [ ] for k , v in self . stat_cache . items ( ) : res . append ( "%s: %s" % ( k , str ( v ) ) ) if len ( res ) > 0 : logmsg = "{%s}" % ", " . join ( res ) self . send_to_logdb ( service , "INFO" , logmsg ) self . stat_cache = { } self . last_stat_flush = time . time ( )