def _post_stats(self, stats):
        '''
        Fire events with stat info if it's time
        '''
        end_time = time.time()
        if end_time - self.stat_clock > self.opts['master_stats_event_iter']:
            # Fire the event with the stats and wipe the tracker
            self.aes_funcs.event.fire_event({'time': end_time - self.stat_clock, 'worker': self.name, 'stats': stats}, tagify(self.name, 'stats'))
            self.stats = collections.defaultdict(lambda: {'mean': 0, 'latency': 0, 'runs': 0})
            self.stat_clock = end_time
def _post_stats ( self , stats ) : end_time = time . time ( ) if end_time - self . stat_clock > self . opts [ 'master_stats_event_iter' ] : self . aes_funcs . event . fire_event ( { 'time' : end_time - self . stat_clock , 'worker' : self . name , 'stats' : stats } , tagify ( self . name , 'stats' ) ) self . stats = collections . defaultdict ( lambda : { 'mean' : 0 , 'latency' : 0 , 'runs' : 0 } ) self . stat_clock = end_time
Fire events with stat info if it's time