use of com.navercorp.pinpoint.bootstrap.sampler.Sampler in project pinpoint by naver.
the class PercentRateSamplerTest method test_33p.
@Test
public void test_33p() {
// 30% = 30.03030303....
Sampler sampler = new PercentRateSampler(33_00);
for (int i = 0; i < 33; i++) {
assertChoice(sampler);
assertDrop(sampler);
assertDrop(sampler);
}
assertDrop(sampler);
assertChoice(sampler);
assertDrop(sampler);
}
use of com.navercorp.pinpoint.bootstrap.sampler.Sampler in project pinpoint by naver.
the class PercentRateSamplerTest method test_10p.
@Test
public void test_10p() {
Sampler sampler = new PercentRateSampler(10_00);
assertChoice(sampler);
for (int i = 0; i < 9; i++) {
assertDrop(sampler);
}
assertChoice(sampler);
}
use of com.navercorp.pinpoint.bootstrap.sampler.Sampler in project pinpoint by naver.
the class PercentRateSamplerTest method test_25p.
@Test
public void test_25p() {
Sampler sampler = new PercentRateSampler(25_00);
assertChoice(sampler);
assertDrop(sampler);
assertDrop(sampler);
assertDrop(sampler);
}
use of com.navercorp.pinpoint.bootstrap.sampler.Sampler 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);
}
use of com.navercorp.pinpoint.bootstrap.sampler.Sampler in project pinpoint by naver.
the class SamplerFactoryTest method createSamplerSamplingRate0.
@Test
public void createSamplerSamplingRate0() {
SamplerFactory samplerFactory = new SamplerFactory();
Sampler sampler = samplerFactory.createSampler(true, 0);
boolean sampling = sampler.isSampling();
Assert.assertFalse(sampling);
}
Aggregations