(self, key)
return self._counters[key]
Gets a counter based on a key, creates a new one if it does not exist.

        :param key: name of the metric
        :type key: C{str}

        :return: L{Counter}
Gets a counter based on a key, creates a new one if it does not exist.
Gets a counter based on a key creates a new one if it does not exist .
def counter(self, key):
        """
        Gets a counter based on a key, creates a new one if it does not exist.

        :param key: name of the metric
        :type key: C{str}

        :return: L{Counter}
        """
        if key not in self._counters:
            self._counters[key] = Counter()
        return self._counters[key]
def counter ( self , key ) : if key not in self . _counters : self . _counters [ key ] = Counter ( ) return self . _counters [ key ]