src/tools/benchmark_tool/benchmark_tool/rqt_graph/rosgraph2_impl.py
def bad_update(self):
        """
        Update loop for nodes with bad connectivity.

        We box them separately
        so that we can maintain the good performance of the normal update loop.
        Once a node is on the bad list it stays there.
        """
        last_node_refresh = self.last_node_refresh

        # nodes left to check
        try:
            self.bad_nodes_lock.acquire()
            # make copy due to multithreading
            update_queue = self.bad_nodes.values()[:]
        finally:
            self.bad_nodes_lock.release()

        # return value. True if new data differs from old
        updated = False
        # number of nodes we checked
        num_nodes = 0

        while update_queue:
            # figure out the next node to contact
            next = update_queue.pop()
            # rate limit talking to any particular node
            if time.time() > (last_node_refresh.get(next, 0.0) + self.node_stale):
                updated = self._node_refresh(next.name, True) or updated
                # include in random offset (max 1/5th normal update interval)
                # to help spread out updates
                last_node_refresh[next] = time.time() + (random.random() * self.node_stale / 5.0)
                num_nodes += 1

            # small yield to keep from torquing the processor
            time.sleep(0.01)
        return updated

        Update loop for nodes with bad connectivity.

        We box them separately
        so that we can maintain the good performance of the normal update loop.
        Once a node is on the bad list it stays there.
        
Update loop for nodes with bad connectivity.
We box them separately
so that we can maintain the good performance of the normal update loop.
Once a node is on the bad list it stays there.
Update loop for nodes with bad connectivity . We box them separately so that we can maintain the good performance of the normal update loop . Once a node is on the bad list it stays there .
def bad_update(self):
        last_node_refresh = self.last_node_refresh
        try:
            self.bad_nodes_lock.acquire()
            update_queue = self.bad_nodes.values()[:]
        finally:
            self.bad_nodes_lock.release()
        updated = False
        num_nodes = 0
        while update_queue:
            next = update_queue.pop()
            if time.time() > (last_node_refresh.get(next, 0.0) + self.node_stale):
                updated = self._node_refresh(next.name, True) or updated
                last_node_refresh[next] = time.time() + (random.random() * self.node_stale / 5.0)
                num_nodes += 1
            time.sleep(0.01)
        return updated
def bad_update ( self ) : last_node_refresh = self . last_node_refresh try : self . bad_nodes_lock . acquire ( ) update_queue = self . bad_nodes . values ( ) [ : ] finally : self . bad_nodes_lock . release ( ) updated = False num_nodes = 0 while update_queue : next = update_queue . pop ( ) if time . time ( ) > ( last_node_refresh . get ( next , 0.0 ) + self . node_stale ) : updated = self . _node_refresh ( next . name , True ) or updated last_node_refresh [ next ] = time . time ( ) + ( random . random ( ) * self . node_stale / 5.0 ) num_nodes += 1 time . sleep ( 0.01 ) return updated
Update loop for nodes with bad connectivity.
Update loop for nodes with bad connectivity .
"""
        Update loop for nodes with bad connectivity.

        We box them separately
        so that we can maintain the good performance of the normal update loop.
        Once a node is on the bad list it stays there.
        """ # nodes left to check # make copy due to multithreading # return value. True if new data differs from old # number of nodes we checked # figure out the next node to contact # rate limit talking to any particular node # include in random offset (max 1/5th normal update interval) # to help spread out updates # small yield to keep from torquing the processor
self