Search in sources :

Example 1 with DefaultAnnotationKeyRegistryService

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

the class AnnotationKeyTest method testValueOf.

@Test
public void testValueOf() {
    AnnotationKeyRegistryService annotationKeyRegistryService = new DefaultAnnotationKeyRegistryService();
    annotationKeyRegistryService.findAnnotationKeyByName(AnnotationKey.ARGS0.getName());
    AnnotationKey valueof = annotationKeyRegistryService.findAnnotationKeyByName(AnnotationKey.ARGS0.getName());
    Assert.assertSame(AnnotationKey.ARGS0, valueof);
}
Also used : DefaultAnnotationKeyRegistryService(com.navercorp.pinpoint.common.service.DefaultAnnotationKeyRegistryService) AnnotationKeyRegistryService(com.navercorp.pinpoint.common.service.AnnotationKeyRegistryService) AnnotationKey(com.navercorp.pinpoint.common.trace.AnnotationKey) DefaultAnnotationKeyRegistryService(com.navercorp.pinpoint.common.service.DefaultAnnotationKeyRegistryService) Test(org.junit.Test)

Example 2 with DefaultAnnotationKeyRegistryService

use of com.navercorp.pinpoint.common.service.DefaultAnnotationKeyRegistryService 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 3 with DefaultAnnotationKeyRegistryService

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

the class AnnotationKeyTest method getCode.

@Test
public void getCode() {
    TraceMetadataLoaderService typeLoaderService = new DefaultTraceMetadataLoaderService();
    AnnotationKeyRegistryService annotationKeyRegistryService = new DefaultAnnotationKeyRegistryService(typeLoaderService, StdoutCommonLoggerFactory.INSTANCE);
    AnnotationKey annotationKey = annotationKeyRegistryService.findAnnotationKey(AnnotationKey.API.getCode());
    Assert.assertEquals(annotationKey, AnnotationKey.API);
}
Also used : DefaultTraceMetadataLoaderService(com.navercorp.pinpoint.common.service.DefaultTraceMetadataLoaderService) TraceMetadataLoaderService(com.navercorp.pinpoint.common.service.TraceMetadataLoaderService) DefaultTraceMetadataLoaderService(com.navercorp.pinpoint.common.service.DefaultTraceMetadataLoaderService) DefaultAnnotationKeyRegistryService(com.navercorp.pinpoint.common.service.DefaultAnnotationKeyRegistryService) AnnotationKeyRegistryService(com.navercorp.pinpoint.common.service.AnnotationKeyRegistryService) AnnotationKey(com.navercorp.pinpoint.common.trace.AnnotationKey) DefaultAnnotationKeyRegistryService(com.navercorp.pinpoint.common.service.DefaultAnnotationKeyRegistryService) Test(org.junit.Test)

Example 4 with DefaultAnnotationKeyRegistryService

use of com.navercorp.pinpoint.common.service.DefaultAnnotationKeyRegistryService 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

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