class documentation

class MapCounter(Metric): (source)

View In Hierarchy

A set of related counters keyed by an arbitrary string.

Method __init__ Initialize the metric and register it under the specified name.
Method inc Increment the metric by the specified amount.
Method _merge Merge data from another metric of the same type.
Method _summary Return a string summarizing the value of the metric.
Instance Variable _counts Undocumented
Instance Variable _total Undocumented

Inherited from Metric:

Method __str__ Undocumented
Property name Undocumented
Instance Variable _name Undocumented
def __init__(self, name): (source)

Initialize the metric and register it under the specified name.

def inc(self, key, count=1): (source)

Increment the metric by the specified amount. Args: key: A string to be used as the key. count: The amount to increment by (non-negative integer). Raises: ValueError: if the count is less than 0.

def _merge(self, other): (source)

Merge data from another metric of the same type.

def _summary(self): (source)

Return a string summarizing the value of the metric.

Undocumented

Undocumented