use of com.navercorp.pinpoint.profiler.instrument.JavassistEngine in project pinpoint by naver.
the class TestClassLoader method addTranslator.
public void addTranslator() {
final InstrumentEngine instrumentEngine = applicationContext.getInstrumentEngine();
if (instrumentEngine instanceof JavassistEngine) {
logger.info("JAVASSIST BCI engine");
ClassPool classPool = ((JavassistEngine) instrumentEngine).getClassPool(this);
this.instrumentTranslator = new JavassistTranslator(this, classPool, applicationContext.getClassFileTransformerDispatcher());
this.addTranslator(instrumentTranslator);
} else if (instrumentEngine instanceof ASMEngine) {
logger.info("ASM BCI engine");
this.instrumentTranslator = new DefaultTranslator(this, applicationContext.getClassFileTransformerDispatcher());
this.addTranslator(instrumentTranslator);
} else {
logger.info("Unknown BCI engine");
this.instrumentTranslator = new DefaultTranslator(this, applicationContext.getClassFileTransformerDispatcher());
this.addTranslator(instrumentTranslator);
}
}
use of com.navercorp.pinpoint.profiler.instrument.JavassistEngine in project pinpoint by naver.
the class JavassistClassTest method newJavassistEngine.
private InstrumentEngine newJavassistEngine() {
Instrumentation instrumentation = mock(Instrumentation.class);
ObjectBinderFactory objectBinderFactory = mock(ObjectBinderFactory.class);
Provider<ApiMetaDataService> apiMetaDataService = Providers.of(mock(ApiMetaDataService.class));
return new JavassistEngine(instrumentation, objectBinderFactory, new GlobalInterceptorRegistryBinder(), apiMetaDataService, null);
}
Aggregations