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);
}
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");
}
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);
}
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);
}
Aggregations