use of com.navercorp.pinpoint.bootstrap.config.DefaultProfilerConfig in project pinpoint by naver.
the class CommonsDbcp2ConfigTest method createCommonsDbcpConfig.
private CommonsDbcp2Config createCommonsDbcpConfig(String pluginEnable, String profileConnectionCloseEnable) {
Properties properties = new Properties();
properties.put(CommonsDbcp2Config.DBCP2_PLUGIN_ENABLE, pluginEnable);
properties.put(CommonsDbcp2Config.DBCP2_PROFILE_CONNECTIONCLOSE_ENABLE, profileConnectionCloseEnable);
ProfilerConfig profilerConfig = new DefaultProfilerConfig(properties);
return new CommonsDbcp2Config(profilerConfig);
}
use of com.navercorp.pinpoint.bootstrap.config.DefaultProfilerConfig in project pinpoint by naver.
the class HikariCpConfigTest method createHikariCpConfig.
private HikariCpConfig createHikariCpConfig(String pluginEnable, String profileConnectionCloseEnable) {
Properties properties = new Properties();
properties.put(HikariCpConfig.HIKARICP_PLUGIN_ENABLE, pluginEnable);
properties.put(HikariCpConfig.HIKARICP_PROFILE_CONNECTIONCLOSE_ENABLE, profileConnectionCloseEnable);
ProfilerConfig profilerConfig = new DefaultProfilerConfig(properties);
return new HikariCpConfig(profilerConfig);
}
use of com.navercorp.pinpoint.bootstrap.config.DefaultProfilerConfig in project pinpoint by naver.
the class DefaultApplicationContextTest method newApplicationContext.
private DefaultApplicationContext newApplicationContext() {
ProfilerConfig profilerConfig = new DefaultProfilerConfig();
InterceptorRegistryBinder binder = new TestInterceptorRegistryBinder();
Instrumentation instrumentation = mock(Instrumentation.class);
AgentOption agentOption = new DefaultAgentOption(instrumentation, "mockAgent", "mockApplicationName", profilerConfig, new URL[0], null, new DefaultServiceTypeRegistryService(), new DefaultAnnotationKeyRegistryService());
return new DefaultApplicationContext(agentOption, binder);
}
use of com.navercorp.pinpoint.bootstrap.config.DefaultProfilerConfig in project pinpoint by naver.
the class DefaultTraceContextTest method disableTrace.
@Test
public void disableTrace() {
ProfilerConfig profilerConfig = new DefaultProfilerConfig();
TraceContext traceContext = MockTraceContextFactory.newTestTraceContext(profilerConfig);
Trace trace = traceContext.disableSampling();
Assert.assertNotNull(trace);
Assert.assertFalse(trace.canSampled());
traceContext.removeTraceObject();
}
use of com.navercorp.pinpoint.bootstrap.config.DefaultProfilerConfig in project pinpoint by naver.
the class DefaultTraceContextTest method threadLocalBindTest.
@Test
public void threadLocalBindTest() {
ProfilerConfig profilerConfig = new DefaultProfilerConfig();
TraceContext traceContext = MockTraceContextFactory.newTestTraceContext(profilerConfig);
Assert.assertNotNull(traceContext.newTraceObject());
TraceContext traceContext2 = MockTraceContextFactory.newTestTraceContext(profilerConfig);
Trace notExist = traceContext2.currentRawTraceObject();
Assert.assertNull(notExist);
Assert.assertNotNull(traceContext.currentRawTraceObject());
traceContext.removeTraceObject();
Assert.assertNull(traceContext.currentRawTraceObject());
}
Aggregations