def __init__(self, hostname, interval=1.0, expiry_seconds=300,
            formatter=None, recent_point_threshold=None,
            histogram_aggregates=None, histogram_percentiles=None,
            utf8_decoding=False):
        self.events = []
        self.service_checks = []
        self.total_count = 0
        self.count = 0
        self.event_count = 0
        self.service_check_count = 0
        self.hostname = hostname
        self.expiry_seconds = expiry_seconds
        self.formatter = formatter or api_formatter
        self.interval = float(interval)

        recent_point_threshold = recent_point_threshold or RECENT_POINT_THRESHOLD_DEFAULT
        self.recent_point_threshold = int(recent_point_threshold)
        self.num_discarded_old_points = 0

        # Additional config passed when instantiating metric configs
        self.metric_config = {
            Histogram: {
                'aggregates': histogram_aggregates,
                'percentiles': histogram_percentiles
            }
        }

        self.utf8_decoding = utf8_decoding
dataset/ETHPy150Open serverdensity/sd-agent/aggregator.py/Aggregator.__init__/original