Search in sources :

Example 1 with SamplerType

use of com.navercorp.pinpoint.profiler.sampler.SamplerType in project pinpoint by naver.

the class SamplerProvider method get.

@Override
public Sampler get() {
    SamplerConfig config = new SamplerConfig(profilerConfig);
    logger.info("SamplerConfig:{}", config);
    if (!config.isSamplingEnable()) {
        return FalseSampler.INSTANCE;
    }
    SamplerType samplerType = config.getSamplerType();
    SamplerFactory samplerFactory = newSamplerFactory(samplerType, profilerConfig);
    return samplerFactory.createSampler();
}
Also used : SamplerFactory(com.navercorp.pinpoint.profiler.sampler.SamplerFactory) PercentSamplerFactory(com.navercorp.pinpoint.profiler.sampler.PercentSamplerFactory) CountingSamplerFactory(com.navercorp.pinpoint.profiler.sampler.CountingSamplerFactory) SamplerType(com.navercorp.pinpoint.profiler.sampler.SamplerType)

Aggregations

CountingSamplerFactory (com.navercorp.pinpoint.profiler.sampler.CountingSamplerFactory)1 PercentSamplerFactory (com.navercorp.pinpoint.profiler.sampler.PercentSamplerFactory)1 SamplerFactory (com.navercorp.pinpoint.profiler.sampler.SamplerFactory)1 SamplerType (com.navercorp.pinpoint.profiler.sampler.SamplerType)1