Search in sources :

Example 1 with AtomicIdGenerator

use of com.navercorp.pinpoint.profiler.context.id.AtomicIdGenerator in project pinpoint by naver.

the class ThroughputSamplerTest method newTraceSampler.

private TraceSampler newTraceSampler(int throughput) {
    IdGenerator atomicIdGenerator = new AtomicIdGenerator();
    Sampler trueSampler = TrueSampler.INSTANCE;
    TraceSampler basicSampler = new BasicTraceSampler(atomicIdGenerator, trueSampler);
    return new RateLimitTraceSampler(throughput, 0, atomicIdGenerator, basicSampler);
}
Also used : TraceSampler(com.navercorp.pinpoint.bootstrap.sampler.TraceSampler) Sampler(com.navercorp.pinpoint.bootstrap.sampler.Sampler) TraceSampler(com.navercorp.pinpoint.bootstrap.sampler.TraceSampler) IdGenerator(com.navercorp.pinpoint.profiler.context.id.IdGenerator) AtomicIdGenerator(com.navercorp.pinpoint.profiler.context.id.AtomicIdGenerator) AtomicIdGenerator(com.navercorp.pinpoint.profiler.context.id.AtomicIdGenerator)

Example 2 with AtomicIdGenerator

use of com.navercorp.pinpoint.profiler.context.id.AtomicIdGenerator in project pinpoint by naver.

the class DefaultTransactionCounterTest method setUp.

@Before
public void setUp() throws Exception {
    this.idGenerator = new AtomicIdGenerator();
    this.transactionCounter = new DefaultTransactionCounter(this.idGenerator);
}
Also used : DefaultTransactionCounter(com.navercorp.pinpoint.profiler.context.id.DefaultTransactionCounter) AtomicIdGenerator(com.navercorp.pinpoint.profiler.context.id.AtomicIdGenerator) Before(org.junit.Before)

Aggregations

AtomicIdGenerator (com.navercorp.pinpoint.profiler.context.id.AtomicIdGenerator)2 Sampler (com.navercorp.pinpoint.bootstrap.sampler.Sampler)1 TraceSampler (com.navercorp.pinpoint.bootstrap.sampler.TraceSampler)1 DefaultTransactionCounter (com.navercorp.pinpoint.profiler.context.id.DefaultTransactionCounter)1 IdGenerator (com.navercorp.pinpoint.profiler.context.id.IdGenerator)1 Before (org.junit.Before)1