Search in sources :

Example 1 with ExecutorConfiguration

use of com.navercorp.pinpoint.collector.config.ExecutorConfiguration in project pinpoint by naver.

the class GrpcStatReceiverConfigurationFactory method newAgentReceiverConfig.

@Bean("grpcStatReceiverConfig")
public GrpcStatReceiverConfiguration newAgentReceiverConfig(Environment environment) {
    boolean enable = environment.getProperty("collector.receiver.grpc.stat.enable", boolean.class, false);
    ServerOption serverOption = newServerOption().build();
    BindAddress bindAddress = newBindAddressBuilder().build();
    ExecutorConfiguration serverExecutor = newServerExecutorBuilder().build();
    ExecutorConfiguration workerExecutor = newWorkerExecutorBuilder().build();
    GrpcStreamConfiguration streamConfiguration = newStreamConfigurationBuilder().build();
    return new GrpcStatReceiverConfiguration(enable, bindAddress, serverExecutor, workerExecutor, serverOption, streamConfiguration);
}
Also used : BindAddress(com.navercorp.pinpoint.collector.receiver.BindAddress) ServerOption(com.navercorp.pinpoint.grpc.server.ServerOption) ExecutorConfiguration(com.navercorp.pinpoint.collector.config.ExecutorConfiguration) Bean(org.springframework.context.annotation.Bean)

Example 2 with ExecutorConfiguration

use of com.navercorp.pinpoint.collector.config.ExecutorConfiguration in project pinpoint by naver.

the class GrpcSpanReceiverConfigurationFactory method newAgentReceiverConfig.

@Bean("grpcSpanReceiverConfig")
public GrpcSpanReceiverConfiguration newAgentReceiverConfig(Environment environment) {
    boolean enable = environment.getProperty("collector.receiver.grpc.span.enable", boolean.class, false);
    ServerOption serverOption = newServerOption().build();
    BindAddress bindAddress = newBindAddressBuilder().build();
    ExecutorConfiguration serverExecutor = newServerExecutorBuilder().build();
    ExecutorConfiguration workerExecutor = newWorkerExecutorBuilder().build();
    GrpcStreamConfiguration streamConfiguration = newStreamConfigurationBuilder().build();
    return new GrpcSpanReceiverConfiguration(enable, bindAddress, serverExecutor, workerExecutor, serverOption, streamConfiguration);
}
Also used : BindAddress(com.navercorp.pinpoint.collector.receiver.BindAddress) ServerOption(com.navercorp.pinpoint.grpc.server.ServerOption) ExecutorConfiguration(com.navercorp.pinpoint.collector.config.ExecutorConfiguration) Bean(org.springframework.context.annotation.Bean)

Example 3 with ExecutorConfiguration

use of com.navercorp.pinpoint.collector.config.ExecutorConfiguration in project pinpoint by naver.

the class GrpcAgentDataReceiverConfigurationFactory method newAgentReceiverConfig.

@Bean("grpcAgentReceiverConfig")
public GrpcAgentDataReceiverConfiguration newAgentReceiverConfig(Environment environment) {
    boolean enable = environment.getProperty("collector.receiver.grpc.agent.enable", boolean.class, false);
    ServerOption serverOption = newServerOption().build();
    BindAddress bindAddress = newBindAddressBuilder().build();
    ExecutorConfiguration serverExecutor = newServerExecutorBuilder().build();
    ExecutorConfiguration workerExecutor = newWorkerExecutorBuilder().build();
    return new GrpcAgentDataReceiverConfiguration(enable, bindAddress, serverExecutor, workerExecutor, serverOption);
}
Also used : BindAddress(com.navercorp.pinpoint.collector.receiver.BindAddress) ServerOption(com.navercorp.pinpoint.grpc.server.ServerOption) ExecutorConfiguration(com.navercorp.pinpoint.collector.config.ExecutorConfiguration) Bean(org.springframework.context.annotation.Bean)

Example 4 with ExecutorConfiguration

use of com.navercorp.pinpoint.collector.config.ExecutorConfiguration in project pinpoint by naver.

the class GrpcAgentDataReceiverConfigurationTest method properties.

@Test
public void properties() {
    assertEquals(Boolean.FALSE, configuration.isEnable());
    BindAddress bindAddress = configuration.getBindAddress();
    assertEquals("1.1.1.1", bindAddress.getIp());
    assertEquals(1, bindAddress.getPort());
    ExecutorConfiguration serverExecutor = configuration.getServerExecutor();
    assertEquals(10, serverExecutor.getThreadSize());
    assertEquals(11, serverExecutor.getQueueSize());
    ExecutorConfiguration workerExecutor = configuration.getWorkerExecutor();
    assertEquals(20, workerExecutor.getThreadSize());
    assertEquals(21, workerExecutor.getQueueSize());
    assertEquals(Boolean.FALSE, workerExecutor.isMonitorEnable());
}
Also used : BindAddress(com.navercorp.pinpoint.collector.receiver.BindAddress) ExecutorConfiguration(com.navercorp.pinpoint.collector.config.ExecutorConfiguration) Test(org.junit.Test)

Aggregations

ExecutorConfiguration (com.navercorp.pinpoint.collector.config.ExecutorConfiguration)4 BindAddress (com.navercorp.pinpoint.collector.receiver.BindAddress)4 ServerOption (com.navercorp.pinpoint.grpc.server.ServerOption)3 Bean (org.springframework.context.annotation.Bean)3 Test (org.junit.Test)1