awslimitchecker.metrics.dummy module

class awslimitchecker.metrics.dummy.Dummy(region_name, **_)[source]

Bases: awslimitchecker.metrics.base.MetricsProvider

Just writes metrics to STDOUT; mainly used for testing.

__init__(region_name, **_)[source]

Initialize a MetricsProvider class. This MUST be overridden by subclasses. All configuration must be passed as keyword arguments to the class constructor (these come from --metrics-config CLI arguments). Any dependency imports must be made in the constructor. The constructor should do as much as possible to validate configuration.

Parameters:region_name (str) – the name of the region we’re connected to
__module__ = 'awslimitchecker.metrics.dummy'
flush()[source]

Flush all metrics to the provider. This is the method that actually sends data to your metrics provider/store. It should iterate over self._limits and send metrics for them, as well as for self._duration.