Search in sources :

Example 1 with DefaultServiceTypeRegistryService

use of com.navercorp.pinpoint.common.service.DefaultServiceTypeRegistryService in project pinpoint by naver.

the class AgentClassLoaderTest method boot.

@Test
public void boot() throws IOException, ClassNotFoundException {
    AgentClassLoader agentClassLoader = new AgentClassLoader(new URL[0]);
    agentClassLoader.setBootClass("com.navercorp.pinpoint.bootstrap.DummyAgent");
    AgentOption option = new DefaultAgentOption(new DummyInstrumentation(), "testCaseAgent", "testCaseAppName", new DefaultProfilerConfig(), new URL[0], null, new DefaultServiceTypeRegistryService(), new DefaultAnnotationKeyRegistryService());
    agentClassLoader.boot(option);
// TODO need verification - implementation for obtaining logger changed
//        PLoggerBinder loggerBinder = (PLoggerBinder) agentClassLoader.initializeLoggerBinder();
//        PLogger test = loggerBinder.getLogger("test");
//        test.info("slf4j logger test");
}
Also used : DefaultProfilerConfig(com.navercorp.pinpoint.bootstrap.config.DefaultProfilerConfig) DefaultServiceTypeRegistryService(com.navercorp.pinpoint.common.service.DefaultServiceTypeRegistryService) DefaultAnnotationKeyRegistryService(com.navercorp.pinpoint.common.service.DefaultAnnotationKeyRegistryService) Test(org.junit.Test)

Example 2 with DefaultServiceTypeRegistryService

use of com.navercorp.pinpoint.common.service.DefaultServiceTypeRegistryService in project pinpoint by naver.

the class ServiceTypeTest method findDesc.

@Test
public void findDesc() {
    DefaultServiceTypeRegistryService serviceTypeRegistryService = new DefaultServiceTypeRegistryService();
    String desc = "UNKNOWN_DB";
    List<ServiceType> serviceTypeList = serviceTypeRegistryService.findDesc(desc);
    boolean find = false;
    for (ServiceType serviceType : serviceTypeList) {
        if (serviceType.getDesc().equals(desc)) {
            find = true;
        }
    }
    Assert.assertTrue(find);
    try {
        serviceTypeList.add(ServiceType.INTERNAL_METHOD);
        Assert.fail();
    } catch (Exception ignored) {
    }
}
Also used : DefaultServiceTypeRegistryService(com.navercorp.pinpoint.common.service.DefaultServiceTypeRegistryService) ServiceType(com.navercorp.pinpoint.common.trace.ServiceType) Test(org.junit.Test)

Example 3 with DefaultServiceTypeRegistryService

use of com.navercorp.pinpoint.common.service.DefaultServiceTypeRegistryService in project pinpoint by naver.

the class MockApplicationContext method of.

public static MockApplicationContext of(ProfilerConfig config) {
    AgentOption agentOption = new DefaultAgentOption(new DummyInstrumentation(), "mockAgent", "mockApplicationName", config, new URL[0], null, new DefaultServiceTypeRegistryService(), new DefaultAnnotationKeyRegistryService());
    InterceptorRegistryBinder binder = new TestInterceptorRegistryBinder();
    binder.bind();
    return new MockApplicationContext(agentOption, binder);
}
Also used : DefaultAgentOption(com.navercorp.pinpoint.bootstrap.DefaultAgentOption) InterceptorRegistryBinder(com.navercorp.pinpoint.profiler.interceptor.registry.InterceptorRegistryBinder) DefaultServiceTypeRegistryService(com.navercorp.pinpoint.common.service.DefaultServiceTypeRegistryService) DefaultAgentOption(com.navercorp.pinpoint.bootstrap.DefaultAgentOption) AgentOption(com.navercorp.pinpoint.bootstrap.AgentOption) DefaultAnnotationKeyRegistryService(com.navercorp.pinpoint.common.service.DefaultAnnotationKeyRegistryService)

Aggregations

DefaultServiceTypeRegistryService (com.navercorp.pinpoint.common.service.DefaultServiceTypeRegistryService)3 DefaultAnnotationKeyRegistryService (com.navercorp.pinpoint.common.service.DefaultAnnotationKeyRegistryService)2 Test (org.junit.Test)2 AgentOption (com.navercorp.pinpoint.bootstrap.AgentOption)1 DefaultAgentOption (com.navercorp.pinpoint.bootstrap.DefaultAgentOption)1 DefaultProfilerConfig (com.navercorp.pinpoint.bootstrap.config.DefaultProfilerConfig)1 ServiceType (com.navercorp.pinpoint.common.trace.ServiceType)1 InterceptorRegistryBinder (com.navercorp.pinpoint.profiler.interceptor.registry.InterceptorRegistryBinder)1