

def __init__(self, host, port, **options):
    self.host = host
    self.port = port
    self.prefix = options.get('prefix')
    self.pickle = options.get('pickle', False)
    self.batch_size = options.get('batch_size', 100)
    if (self.batch_size <= 0):
        self.batch_size = 1
    super(GraphiteReporter, self).__init__(**options)
    self.batch_count = 0
    if self.pickle:
        self._buffered_send_metric = self._buffered_pickle_send_metric
        self._send = self._send_pickle
        self.batch_buffer = []
    else:
        self._buffered_send_metric = self._buffered_plaintext_send_metric
        self._send = self._send_plaintext
        self.batch_buffer = ''

dataset/ETHPy150Open cyberdelia/metrology/metrology/reporter/graphite.py GraphiteReporter.__init__/original