(self)
return metrics_to_collect
Build the metric list to collect based on the instance preferences.
Build the metric list to collect based on the instance preferences.
Build the metric list to collect based on the instance preferences .
def _build_metric_list_to_collect(self):
        """
        Build the metric list to collect based on the instance preferences.
        """
        metrics_to_collect = {}

        # Default metrics
        for default_metrics in itervalues(metrics.DEFAULT_METRICS):
            metrics_to_collect.update(default_metrics)

        # Additional metrics metrics
        for option in self._config.additional_metrics:
            if option not in metrics.AVAILABLE_METRICS:
                if option in metrics.DEFAULT_METRICS:
                    self.log.warning(
                        u"`%s` option is deprecated. The corresponding metrics are collected by default.", option
                    )
                else:
                    self.log.warning(
                        u"Failed to extend the list of metrics to collect: unrecognized `%s` option", option
                    )
                continue
            additional_metrics = metrics.AVAILABLE_METRICS[option]
            self.log.debug(u"Adding `%s` corresponding metrics to the list of metrics to collect.", option)
            metrics_to_collect.update(additional_metrics)

        return metrics_to_collect
def _build_metric_list_to_collect ( self ) : metrics_to_collect = { } # Default metrics for default_metrics in itervalues ( metrics . DEFAULT_METRICS ) : metrics_to_collect . update ( default_metrics ) # Additional metrics metrics for option in self . _config . additional_metrics : if option not in metrics . AVAILABLE_METRICS : if option in metrics . DEFAULT_METRICS : self . log . warning ( u"`%s` option is deprecated. The corresponding metrics are collected by default." , option ) else : self . log . warning ( u"Failed to extend the list of metrics to collect: unrecognized `%s` option" , option ) continue additional_metrics = metrics . AVAILABLE_METRICS [ option ] self . log . debug ( u"Adding `%s` corresponding metrics to the list of metrics to collect." , option ) metrics_to_collect . update ( additional_metrics ) return metrics_to_collect