use of com.navercorp.pinpoint.profiler.plugin.GuardProfilerPluginContext in project pinpoint by naver.
the class MockPluginSetup method setupPlugin.
@Override
public SetupResult setupPlugin(ProfilerPlugin plugin, ClassInjector classInjector) {
final DefaultProfilerPluginSetupContext pluginSetupContext = new DefaultProfilerPluginSetupContext(profilerConfig);
final GuardProfilerPluginContext guardPluginSetupContext = new GuardProfilerPluginContext(pluginSetupContext);
ClassFileTransformerLoader classFileTransformerLoader = new ClassFileTransformerLoader(profilerConfig, dynamicTransformTrigger);
InstrumentContext instrumentContext = new PluginInstrumentContext(profilerConfig, instrumentEngine, dynamicTransformTrigger, classInjector, classFileTransformerLoader);
try {
preparePlugin(plugin, instrumentContext);
plugin.setup(guardPluginSetupContext);
} finally {
guardPluginSetupContext.close();
}
SetupResult setup = new SetupResult(pluginSetupContext, classFileTransformerLoader);
return setup;
}
Aggregations