Search in sources :

Example 1 with GuardProfilerPluginContext

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;
}
Also used : SetupResult(com.navercorp.pinpoint.profiler.plugin.SetupResult) PluginInstrumentContext(com.navercorp.pinpoint.profiler.plugin.PluginInstrumentContext) InstrumentContext(com.navercorp.pinpoint.bootstrap.instrument.InstrumentContext) PluginInstrumentContext(com.navercorp.pinpoint.profiler.plugin.PluginInstrumentContext) DefaultProfilerPluginSetupContext(com.navercorp.pinpoint.profiler.plugin.DefaultProfilerPluginSetupContext) GuardProfilerPluginContext(com.navercorp.pinpoint.profiler.plugin.GuardProfilerPluginContext) ClassFileTransformerLoader(com.navercorp.pinpoint.profiler.plugin.ClassFileTransformerLoader)

Aggregations

InstrumentContext (com.navercorp.pinpoint.bootstrap.instrument.InstrumentContext)1 ClassFileTransformerLoader (com.navercorp.pinpoint.profiler.plugin.ClassFileTransformerLoader)1 DefaultProfilerPluginSetupContext (com.navercorp.pinpoint.profiler.plugin.DefaultProfilerPluginSetupContext)1 GuardProfilerPluginContext (com.navercorp.pinpoint.profiler.plugin.GuardProfilerPluginContext)1 PluginInstrumentContext (com.navercorp.pinpoint.profiler.plugin.PluginInstrumentContext)1 SetupResult (com.navercorp.pinpoint.profiler.plugin.SetupResult)1