Module Import alias Import alias Import alias Import alias ImportFrom alias alias alias alias alias alias alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore TupleLoad TupleLoad NameLoad AttributeLoad NameLoad attr TupleLoad NameLoad AttributeLoad NameLoad attr TupleLoad NameLoad AttributeLoad NameLoad attr TupleLoad NameLoad AttributeLoad NameLoad attr TupleLoad NameLoad AttributeLoad NameLoad attr For TupleStore NameStore NameStore NameLoad body If Call NameLoad NameLoad NameLoad body If CompareIn NameLoad NameLoad body Raise Call NameLoad BinOpMod Str NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Return Raise Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareNotIn NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call NameLoad Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareNotIn NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call NameLoad keyword AttributeLoad NameLoad attr Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Call NameLoad Str body If CompareNotIn NameLoad AttributeLoad NameLoad attr body If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad orelse If UnaryOpNot Call NameLoad NameLoad NameLoad body If UnaryOpNot Call NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore Call NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareNotIn NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call NameLoad keyword AttributeLoad NameLoad attr Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareNotIn NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call NameLoad keyword AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Return Dict Str Call AttributeLoad NameLoad attr Return Dict decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Return Dict Str Call AttributeLoad NameLoad attr Return Dict decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict Str Str Str Str Str Str Str Str Str Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return NameLoad Return Dict decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore Dict Str Str Str Str Str Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return NameLoad Return Dict decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return NameLoad Return Dict decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Dict For NameStore TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict For NameStore TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body For NameStore Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad Str attr GeneratorExp NameLoad comprehension NameStore NameLoad comprehension NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list Assign NameStore Call NameLoad FunctionDef arguments args defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Global identifier Assign NameStore NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If CompareGt SubscriptLoad AttributeLoad NameLoad attr Index Num Num body Return AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args defaults vararg kwarg body Expr Call AttributeLoad Call NameLoad BinOpMod Str Call NameLoad NameLoad attr Return Call NameLoad NameLoad NameLoad decorator_list Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args defaults vararg kwarg body Expr Call AttributeLoad Call NameLoad BinOpMod Str Call NameLoad NameLoad attr Return Call NameLoad NameLoad NameLoad decorator_list Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args defaults vararg kwarg body Assign NameStore Call NameLoad BinOpMod Str Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad If CompareIn Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args defaults vararg kwarg body Assign NameStore Call NameLoad BinOpMod Str Call NameLoad NameLoad With Call AttributeLoad NameLoad attr keyword Call NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad decorator_list Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list
N/A N/A functools N/A re N/A time N/A sys meters Counter Histogram Meter Timer Gauge CallbackGauge SimpleGauge MetricsRegistry N/A object N/A N/A 
    A single interface used to gather metrics on a service. It keeps track of
    all the relevant Counters, Meters, Histograms, and Timers. It does not have
    a reference back to its service. The service would create a
    L{MetricsRegistry} to manage all of its metrics tools.
     __init__ N/A N/A self clock N/A time N/A N/A 
        Creates a new L{MetricsRegistry} instance.
         N/A N/A self _timers N/A N/A N/A self _meters N/A N/A N/A self _counters N/A N/A N/A self _histograms N/A N/A N/A self _gauges N/A N/A N/A self _clock clock N/A add N/A N/A self key metric N/A N/A N/A 
        Use this method to manually add custom metric instances to the registry
        which are not created with their constructor's default arguments,
        e.g. Histograms with a different size.

        :param key: name of the metric
        :type key: C{str}
        :param metric: instance of Histogram, Meter, Gauge, Timer or Counter
         N/A class_map N/A N/A Histogram N/A self _histograms N/A Meter N/A self _meters N/A Gauge N/A self _gauges N/A Timer N/A self _timers N/A Counter N/A self _counters N/A N/A cls registry class_map N/A N/A N/A isinstance metric cls N/A N/A N/A key registry N/A N/A N/A LookupError N/A Metric %r already registered key N/A N/A registry N/A key metric N/A N/A N/A TypeError N/A Invalid class. Could not register metric %r key N/A counter N/A N/A self key N/A N/A N/A 
        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}
         N/A N/A key N/A self _counters N/A N/A N/A N/A self _counters N/A key N/A Counter N/A N/A N/A self _counters N/A key N/A histogram N/A N/A self key N/A N/A N/A 
        Gets a histogram 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{Histogram}
         N/A N/A key N/A self _histograms N/A N/A N/A N/A self _histograms N/A key N/A Histogram clock N/A self _clock N/A N/A N/A self _histograms N/A key N/A gauge N/A N/A self key gauge default N/A None N/A float nan N/A N/A N/A key N/A self _gauges N/A N/A N/A gauge None N/A N/A gauge N/A SimpleGauge default N/A N/A N/A N/A isinstance gauge Gauge N/A N/A N/A N/A callable gauge N/A N/A N/A TypeError gauge getter not callable N/A gauge N/A CallbackGauge gauge N/A N/A N/A self _gauges N/A key gauge N/A N/A N/A self _gauges N/A key N/A meter N/A N/A self key N/A N/A N/A 
        Gets a meter 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{Meter}
         N/A N/A key N/A self _meters N/A N/A N/A N/A self _meters N/A key N/A Meter clock N/A self _clock N/A N/A N/A self _meters N/A key N/A create_sink N/A N/A self N/A N/A N/A None N/A timer N/A N/A self key N/A N/A N/A 
        Gets a timer 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{Timer}
         N/A N/A key N/A self _timers N/A N/A N/A N/A self _timers N/A key N/A Timer clock N/A self _clock sink N/A N/A self create_sink N/A N/A N/A self _timers N/A key N/A clear N/A N/A self N/A N/A N/A N/A N/A N/A self _meters clear N/A N/A N/A N/A self _counters clear N/A N/A N/A N/A self _gauges clear N/A N/A N/A N/A self _timers clear N/A N/A N/A N/A self _histograms clear N/A _get_counter_metrics N/A N/A self key N/A N/A N/A N/A key N/A self _counters N/A N/A counter N/A N/A self _counters N/A key N/A N/A count N/A N/A counter get_count N/A N/A N/A _get_gauge_metrics N/A N/A self key N/A N/A N/A N/A key N/A self _gauges N/A N/A gauge N/A N/A self _gauges N/A key N/A N/A value N/A N/A gauge get_value N/A N/A N/A _get_histogram_metrics N/A N/A self key N/A N/A N/A N/A key N/A self _histograms N/A N/A histogram N/A N/A self _histograms N/A key N/A snapshot N/A N/A histogram get_snapshot N/A res N/A avg count max min std_dev 75_percentile 95_percentile 99_percentile 999_percentile N/A N/A histogram get_mean N/A N/A histogram get_count N/A N/A histogram get_max N/A N/A histogram get_min N/A N/A histogram get_stddev N/A N/A snapshot get_75th_percentile N/A N/A snapshot get_95th_percentile N/A N/A snapshot get_99th_percentile N/A N/A snapshot get_999th_percentile N/A res N/A N/A N/A _get_meter_metrics N/A N/A self key N/A N/A N/A N/A key N/A self _meters N/A N/A meter N/A N/A self _meters N/A key N/A res N/A count 15m_rate 5m_rate 1m_rate mean_rate N/A N/A meter get_count N/A N/A meter get_fifteen_minute_rate N/A N/A meter get_five_minute_rate N/A N/A meter get_one_minute_rate N/A N/A meter get_mean_rate N/A res N/A N/A N/A _get_timer_metrics N/A N/A self key N/A N/A N/A N/A key N/A self _timers N/A N/A timer N/A N/A self _timers N/A key N/A snapshot N/A N/A timer get_snapshot N/A res N/A avg sum count max min std_dev 15m_rate 5m_rate 1m_rate mean_rate 50_percentile 75_percentile 95_percentile 99_percentile 999_percentile N/A N/A timer get_mean N/A N/A timer get_sum N/A N/A timer get_count N/A N/A timer get_max N/A N/A timer get_min N/A N/A timer get_stddev N/A N/A timer get_fifteen_minute_rate N/A N/A timer get_five_minute_rate N/A N/A timer get_one_minute_rate N/A N/A timer get_mean_rate N/A N/A snapshot get_median N/A N/A snapshot get_75th_percentile N/A N/A snapshot get_95th_percentile N/A N/A snapshot get_99th_percentile N/A N/A snapshot get_999th_percentile N/A res N/A N/A N/A get_metrics N/A N/A self key N/A N/A N/A 
        Gets all the metrics for a specified key.

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

        :return: C{dict}
         N/A metrics N/A N/A getter N/A N/A self _get_counter_metrics N/A self _get_histogram_metrics N/A self _get_meter_metrics N/A self _get_timer_metrics N/A self _get_gauge_metrics N/A N/A N/A N/A metrics update N/A getter key N/A metrics N/A dump_metrics N/A N/A self N/A N/A N/A 
        Formats all of the metrics and returns them as a dict.

        :return: C{list} of C{dict} of metrics
         N/A metrics N/A N/A metric_type N/A N/A self _counters N/A self _histograms N/A self _meters N/A self _timers N/A self _gauges N/A N/A key N/A N/A metric_type keys N/A N/A N/A metrics N/A key N/A N/A self get_metrics key N/A metrics N/A N/A RegexRegistry N/A MetricsRegistry N/A N/A 
    A single interface used to gather metrics on a service. This class uses a regex to combine
    measures that match a pattern. For example, if you have a REST API, instead of defining
    a timer for each method, you can use a regex to capture all API calls and group them.
    A pattern like '^/api/(?P<model>)/\d+/(?P<verb>)?$' will group and measure the following:
        /api/users/1 -> users
        /api/users/1/edit -> users/edit
        /api/users/2/edit -> users/edit
     __init__ N/A N/A self pattern clock N/A None time N/A N/A N/A N/A N/A super RegexRegistry self __init__ clock N/A N/A pattern None N/A N/A N/A self pattern N/A N/A re compile pattern N/A N/A N/A self pattern N/A N/A re compile ^$ N/A _get_key N/A N/A self key N/A N/A N/A matches N/A N/A N/A self pattern finditer key N/A key N/A N/A / join N/A v N/A match matches N/A v N/A N/A match groups v N/A key N/A timer N/A N/A self key N/A N/A N/A N/A N/A N/A super RegexRegistry self timer N/A N/A self _get_key key N/A histogram N/A N/A self key N/A N/A N/A N/A N/A N/A super RegexRegistry self histogram N/A N/A self _get_key key N/A counter N/A N/A self key N/A N/A N/A N/A N/A N/A super RegexRegistry self counter N/A N/A self _get_key key N/A gauge N/A N/A self key gauge N/A None N/A N/A N/A N/A N/A super RegexRegistry self gauge N/A N/A self _get_key key gauge N/A meter N/A N/A self key N/A N/A N/A N/A N/A N/A super RegexRegistry self meter N/A N/A self _get_key key N/A N/A N/A _global_registry N/A MetricsRegistry global_registry N/A N/A N/A N/A N/A _global_registry N/A set_global_registry N/A N/A registry N/A N/A N/A _global_registry N/A _global_registry registry N/A counter N/A N/A key N/A N/A N/A N/A N/A _global_registry counter key N/A histogram N/A N/A key N/A N/A N/A N/A N/A _global_registry histogram key N/A meter N/A N/A key N/A N/A N/A N/A N/A _global_registry meter key N/A timer N/A N/A key N/A N/A N/A N/A N/A _global_registry timer key N/A gauge N/A N/A key gauge N/A None N/A N/A N/A N/A _global_registry gauge key gauge N/A dump_metrics N/A N/A N/A N/A N/A N/A N/A _global_registry dump_metrics N/A clear N/A N/A N/A N/A N/A N/A N/A _global_registry clear N/A get_qualname N/A N/A obj N/A N/A N/A N/A N/A N/A sys version_info N/A 0 2 N/A N/A N/A obj __qualname__ N/A N/A obj __name__ N/A count_calls N/A N/A fn N/A N/A N/A 
    Decorator to track the number of times a function is called.

    :param fn: the function to be decorated
    :type fn: C{func}

    :return: the decorated function
    :rtype: C{func}
     wrapper N/A N/A N/A args kwargs N/A N/A N/A N/A N/A counter N/A %s_calls N/A get_qualname fn inc N/A N/A fn args kwargs N/A N/A N/A functools wraps fn N/A wrapper N/A meter_calls N/A N/A fn N/A N/A N/A 
    Decorator to the rate at which a function is called.

    :param fn: the function to be decorated
    :type fn: C{func}

    :return: the decorated function
    :rtype: C{func}
     wrapper N/A N/A N/A args kwargs N/A N/A N/A N/A N/A meter N/A %s_calls N/A get_qualname fn mark N/A N/A fn args kwargs N/A N/A N/A functools wraps fn N/A wrapper N/A hist_calls N/A N/A fn N/A N/A N/A 
    Decorator to check the distribution of return values of a function.

    :param fn: the function to be decorated
    :type fn: C{func}

    :return: the decorated function
    :rtype: C{func}
     wrapper N/A N/A N/A args kwargs N/A N/A _histogram N/A histogram N/A %s_calls N/A get_qualname fn N/A rtn N/A fn args kwargs N/A N/A N/A type rtn N/A int float N/A N/A N/A N/A _histogram update rtn N/A rtn N/A N/A N/A functools wraps fn N/A wrapper N/A time_calls N/A N/A fn N/A N/A N/A 
    Decorator to time the execution of the function.

    :param fn: the function to be decorated
    :type fn: C{func}

    :return: the decorated function
    :rtype: C{func}
     wrapper N/A N/A N/A args kwargs N/A N/A _timer N/A timer N/A %s_calls N/A get_qualname fn N/A N/A N/A _timer time fn N/A get_qualname fn N/A N/A N/A fn args kwargs N/A N/A N/A functools wraps fn N/A wrapper N/A