def _new_reporter(self, batch_size, flush=None, queue_cap=100): reporter = Reporter('ch', batch_size=batch_size, flush_interval=flush, metrics=FakeMetrics(), error_reporter=HardErrorReporter(), queue_capacity=queue_cap) sender = ManualSender() reporter._send = sender return reporter, sender
def _new_reporter(self, batch_size, flush=None, queue_cap=100): reporter = Reporter(channel=mock.MagicMock(), io_loop=IOLoop.current(), batch_size=batch_size, flush_interval=flush, metrics_factory=FakeMetricsFactory(), error_reporter=HardErrorReporter(), queue_capacity=queue_cap) sender = FakeSender() reporter._send = sender return reporter, sender
def _new_reporter(batch_size, flush=None, queue_cap=100): reporter = Reporter(channel=mock.MagicMock(), io_loop=IOLoop.current(), batch_size=batch_size, flush_interval=flush, metrics_factory=FakeMetricsFactory(), error_reporter=HardErrorReporter(), queue_capacity=queue_cap) reporter.set_process('service', {}, max_length=0) sender = FakeSender() reporter._send = sender return reporter, sender
def _new_reporter(batch_size, flush=None, queue_cap=100): reporter = Reporter(sender=mock.MagicMock(), io_loop=IOLoop.current(), batch_size=batch_size, flush_interval=flush, metrics_factory=FakeMetricsFactory(), error_reporter=HardErrorReporter(), queue_capacity=queue_cap) reporter.set_process('service', {}, max_length=0) sender = FakeSender() reporter._send = sender return reporter, sender