hystrix.metrics module¶
Used by hystrix.command.Command to record metrics.
-
class
hystrix.metrics.Metrics(counter)¶ Bases:
objectBase class for metrics
Parameters: counter ( hystrix.rolling_number.RollingNumber) – Used to increment or set values over time.-
cumulative_count(event)¶ Cumulative count
Get the cumulative count since the start of the application for the given
RollingNumberEvent.Parameters: event ( RollingNumberEvent) – The Event to retrieve a sum for.Returns: Returns the long cumulative count. Return type: long
-
rolling_count(event)¶ Rolling count
Get the rolling count for the given:class:RollingNumberEvent.
Parameters: event ( RollingNumberEvent) – The Event to retrieve a sum for.Returns: Returns the long cumulative count. Return type: long
-
-
class
hystrix.metrics.CommandMetricsMetaclass¶ Bases:
typeMetaclass for
CommandMetricsReturn a cached or create the
CommandMetricsinstance for a givenhystrix.command.Commandname.This ensures only 1
CommandMetricsinstance perhystrix.command.Commandname.
-
class
hystrix.metrics.CommandMetrics¶ Bases:
hystrix.metrics.MetricsCommand metrics