use of com.newrelic.agent.config.ConfigService in project newrelic-java-agent by newrelic.
the class ProfileTest method turnOnSimpleCompression.
private void turnOnSimpleCompression() {
Map<String, Object> map = ImmutableMap.<String, Object>of(AgentConfigImpl.SIMPLE_COMPRESSION_PROPERTY, true);
AgentConfig agentConfig = AgentConfigImpl.createAgentConfig(map);
ConfigService configService = ConfigServiceFactory.createConfigService(agentConfig, map);
serviceManager.setConfigService(configService);
}
use of com.newrelic.agent.config.ConfigService in project newrelic-java-agent by newrelic.
the class ProfileTest method turnOffSimpleCompression.
private void turnOffSimpleCompression() {
Map<String, Object> map = ImmutableMap.<String, Object>of(AgentConfigImpl.SIMPLE_COMPRESSION_PROPERTY, false);
AgentConfig agentConfig = AgentConfigImpl.createAgentConfig(map);
ConfigService configService = ConfigServiceFactory.createConfigService(agentConfig, map);
serviceManager.setConfigService(configService);
}
use of com.newrelic.agent.config.ConfigService in project newrelic-java-agent by newrelic.
the class ProfilerServiceTest method createServiceManager.
private MockServiceManager createServiceManager(Map<String, Object> map) throws Exception {
MockServiceManager serviceManager = new MockServiceManager();
ServiceFactory.setServiceManager(serviceManager);
ThreadService threadService = new ThreadService();
serviceManager.setThreadService(threadService);
ConfigService configService = ConfigServiceFactory.createConfigService(AgentConfigImpl.createAgentConfig(map), map);
serviceManager.setConfigService(configService);
TransactionService transactionService = new TransactionService();
serviceManager.setTransactionService(transactionService);
ProfilerService profilerService = new ProfilerService();
serviceManager.setProfilerService(profilerService);
return serviceManager;
}
use of com.newrelic.agent.config.ConfigService in project newrelic-java-agent by newrelic.
the class TransactionNamingTest method createServiceManager.
private static void createServiceManager(Map<String, Object> map) throws Exception {
MockServiceManager serviceManager = new MockServiceManager();
ServiceFactory.setServiceManager(serviceManager);
serviceManager.start();
ThreadService threadService = new ThreadService();
serviceManager.setThreadService(threadService);
ConfigService configService = ConfigServiceFactory.createConfigService(AgentConfigImpl.createAgentConfig(map), map);
serviceManager.setConfigService(configService);
MockCoreService agent = new MockCoreService();
serviceManager.setCoreService(agent);
HarvestService harvestService = new MockHarvestService();
serviceManager.setHarvestService(harvestService);
TransactionService transactionService = new TransactionService();
serviceManager.setTransactionService(transactionService);
TransactionTraceService transactionTraceService = new TransactionTraceService();
serviceManager.setTransactionTraceService(transactionTraceService);
SqlTraceService sqlTraceService = new SqlTraceServiceImpl();
serviceManager.setSqlTraceService(sqlTraceService);
MockRPMServiceManager rpmServiceManager = new MockRPMServiceManager();
serviceManager.setRPMServiceManager(rpmServiceManager);
MockRPMService rpmService = new MockRPMService();
rpmService.setApplicationName("Unit Test");
rpmServiceManager.setRPMService(rpmService);
NormalizationService normalizationService = new NormalizationServiceImpl();
serviceManager.setNormalizationService(normalizationService);
AttributesService attributeService = new AttributesService();
serviceManager.setAttributesService(attributeService);
}
use of com.newrelic.agent.config.ConfigService in project newrelic-java-agent by newrelic.
the class MessagingUtilTest method createServiceManager.
private static void createServiceManager(Map<String, Object> configMap) throws Exception {
MockServiceManager serviceManager = new MockServiceManager();
ServiceFactory.setServiceManager(serviceManager);
serviceManager.start();
ThreadService threadService = new ThreadService();
serviceManager.setThreadService(threadService);
ConfigService configService = ConfigServiceFactory.createConfigService(AgentConfigImpl.createAgentConfig(configMap), configMap);
serviceManager.setConfigService(configService);
MockCoreService agent = new MockCoreService();
serviceManager.setCoreService(agent);
HarvestService harvestService = new MockHarvestService();
serviceManager.setHarvestService(harvestService);
TransactionService transactionService = new TransactionService();
serviceManager.setTransactionService(transactionService);
TransactionTraceService transactionTraceService = new TransactionTraceService();
serviceManager.setTransactionTraceService(transactionTraceService);
SqlTraceService sqlTraceService = new SqlTraceServiceImpl();
serviceManager.setSqlTraceService(sqlTraceService);
AttributesService attService = new AttributesService();
serviceManager.setAttributesService(attService);
MockRPMServiceManager rpmServiceManager = new MockRPMServiceManager();
serviceManager.setRPMServiceManager(rpmServiceManager);
}
Aggregations