Пример #1
0
def test_100pct_sampling_250mcs(benchmark):
    tracer = Tracer.default_tracer(channel=None,
                                   service_name='benchmark',
                                   reporter=NullReporter(),
                                   sampler=ConstSampler(True))
    # 250 micros for request execution
    benchmark(_generate_spans, tracer, sleep=0.00025)
Пример #2
0
def test_all_not_batched(benchmark):
    from tchannel.sync import TChannel
    ch = TChannel(name='foo')
    f = ch.advertise(routers=["127.0.0.1:21300", "127.0.0.1:21301"])
    f.result()
    tracer = Tracer.default_tracer(ch, service_name='benchmark', sampler=ConstSampler(True))
    tracer.reporter.batch_size = 1
    # 250 micros for request execution
    benchmark(_generate_spans, tracer, sleep=0.00025)
def test_all_not_batched(benchmark):
    from tchannel.sync import TChannel
    ch = TChannel(name='foo')
    f = ch.advertise(routers=['127.0.0.1:21300', '127.0.0.1:21301'])
    f.result()
    tracer = Tracer.default_tracer(ch, service_name='benchmark', sampler=ConstSampler(True))
    tracer.reporter.batch_size = 1
    # 250 micros for request execution
    benchmark(_generate_spans, tracer, sleep=0.00025)
Пример #4
0
def test_100pct_sampling(benchmark):
    tracer = Tracer.default_tracer(channel=None,
                                   service_name='benchmark',
                                   reporter=NullReporter(),
                                   sampler=ConstSampler(True))
    benchmark(_generate_spans, tracer)
def test_100pct_sampling_250mcs(benchmark):
    tracer = Tracer.default_tracer(
        channel=None, service_name='benchmark',
        reporter=NullReporter(), sampler=ConstSampler(True))
    # 250 micros for request execution
    benchmark(_generate_spans, tracer, sleep=0.00025)
def test_100pct_sampling(benchmark):
    tracer = Tracer.default_tracer(
        channel=None, service_name='benchmark',
        reporter=NullReporter(), sampler=ConstSampler(True))
    benchmark(_generate_spans, tracer)