use of com.navercorp.pinpoint.bootstrap.sampler.Sampler in project pinpoint by naver.
the class SamplerFactoryTest method createSamplerSamplingRate_Negative.
@Test
public void createSamplerSamplingRate_Negative() {
SamplerFactory samplerFactory = new SamplerFactory();
Sampler sampler = samplerFactory.createSampler(true, -1);
boolean sampling = sampler.isSampling();
Assert.assertFalse(sampling);
}
use of com.navercorp.pinpoint.bootstrap.sampler.Sampler in project pinpoint by naver.
the class CountingSamplerFactoryTest method sampling.
@Test
public void sampling() {
SamplerFactory factory = new CountingSamplerFactory(2);
Sampler sampler = factory.createSampler();
Assert.assertEquals(true, sampler.isSampling());
Assert.assertEquals(false, sampler.isSampling());
Assert.assertEquals(true, sampler.isSampling());
Assert.assertEquals(false, sampler.isSampling());
}
use of com.navercorp.pinpoint.bootstrap.sampler.Sampler in project pinpoint by naver.
the class CountingSamplerFactoryTest method createSamplerSamplingRate0.
@Test
public void createSamplerSamplingRate0() {
SamplerFactory factory = new CountingSamplerFactory(0);
Sampler sampler = factory.createSampler();
boolean sampling = sampler.isSampling();
Assert.assertFalse(sampling);
}
use of com.navercorp.pinpoint.bootstrap.sampler.Sampler in project pinpoint by naver.
the class PercentSamplerFactoryTest method isSampling.
@Test
public void isSampling() {
SamplerFactory factory = new PercentSamplerFactory(50_00);
Sampler sampler = factory.createSampler();
Assert.assertEquals(true, sampler.isSampling());
Assert.assertEquals(false, sampler.isSampling());
Assert.assertEquals(true, sampler.isSampling());
Assert.assertEquals(false, sampler.isSampling());
}
use of com.navercorp.pinpoint.bootstrap.sampler.Sampler in project pinpoint by naver.
the class PercentRateSamplerTest method test_50p.
@Test
public void test_50p() {
Sampler sampler = new PercentRateSampler(50_00);
assertChoice(sampler);
assertDrop(sampler);
assertChoice(sampler);
assertDrop(sampler);
}
Aggregations