use of com.navercorp.pinpoint.bootstrap.sampler.Sampler in project pinpoint by naver.
the class PercentRateSamplerTest method test_75p.
@Test
public void test_75p() {
Sampler sampler = new PercentRateSampler(75_00);
assertChoice(sampler);
assertChoice(sampler);
assertChoice(sampler);
assertDrop(sampler);
}
use of com.navercorp.pinpoint.bootstrap.sampler.Sampler in project pinpoint by naver.
the class PercentRateSamplerTest method test_1p.
@Test
public void test_1p() {
Sampler sampler = new PercentRateSampler(1_00);
assertChoice(sampler);
for (int i = 0; i < 99; i++) {
assertDrop(sampler);
}
assertChoice(sampler);
}
use of com.navercorp.pinpoint.bootstrap.sampler.Sampler in project pinpoint by naver.
the class CountingSamplerFactoryTest method createSamplerSamplingRate_Negative.
@Test
public void createSamplerSamplingRate_Negative() {
SamplerFactory factory = new CountingSamplerFactory(-1);
Sampler sampler = factory.createSampler();
boolean sampling = sampler.isSampling();
Assert.assertFalse(sampling);
}
Aggregations