use of com.navercorp.pinpoint.web.alarm.collector.AgentStatDataCollector in project pinpoint by naver.
the class HeapUsageRateCheckerTest method checkTest1.
@Test
public void checkTest1() {
Rule rule = new Rule(SERVICE_NAME, SERVICE_TYPE, CheckerCategory.HEAP_USAGE_RATE.getName(), 70, "testGroup", false, false, "");
Application application = new Application(SERVICE_NAME, ServiceType.STAND_ALONE);
AgentStatDataCollector collector = new AgentStatDataCollector(DataCollectorCategory.AGENT_STAT, application, jvmGcDao, cpuLoadDao, applicationIndexDao, System.currentTimeMillis(), DataCollectorFactory.SLOT_INTERVAL_FIVE_MIN);
AgentChecker checker = new HeapUsageRateChecker(collector, rule);
checker.check();
assertTrue(checker.isDetected());
}
use of com.navercorp.pinpoint.web.alarm.collector.AgentStatDataCollector in project pinpoint by naver.
the class JvmCpuUsageRateCheckerTest method checkTest1.
@Test
public void checkTest1() {
Rule rule = new Rule(SERVICE_NAME, SERVICE_TYPE, CheckerCategory.JVM_CPU_USAGE_RATE.getName(), 60, "testGroup", false, false, "");
Application application = new Application(SERVICE_NAME, ServiceType.STAND_ALONE);
AgentStatDataCollector collector = new AgentStatDataCollector(DataCollectorCategory.AGENT_STAT, application, jvmGcDao, cpuLoadDao, applicationIndexDao, System.currentTimeMillis(), DataCollectorFactory.SLOT_INTERVAL_FIVE_MIN);
AgentChecker checker = new JvmCpuUsageRateChecker(collector, rule);
checker.check();
assertTrue(checker.isDetected());
}
use of com.navercorp.pinpoint.web.alarm.collector.AgentStatDataCollector in project pinpoint by naver.
the class JvmCpuUsageRateCheckerTest method checkTest2.
@Test
public void checkTest2() {
Rule rule = new Rule(SERVICE_NAME, SERVICE_TYPE, CheckerCategory.JVM_CPU_USAGE_RATE.getName(), 61, "testGroup", false, false, "");
Application application = new Application(SERVICE_NAME, ServiceType.STAND_ALONE);
AgentStatDataCollector collector = new AgentStatDataCollector(DataCollectorCategory.AGENT_STAT, application, jvmGcDao, cpuLoadDao, applicationIndexDao, System.currentTimeMillis(), DataCollectorFactory.SLOT_INTERVAL_FIVE_MIN);
AgentChecker checker = new JvmCpuUsageRateChecker(collector, rule);
checker.check();
assertFalse(checker.isDetected());
}
use of com.navercorp.pinpoint.web.alarm.collector.AgentStatDataCollector in project pinpoint by naver.
the class HeapUsageRateCheckerTest method checkTest2.
@Test
public void checkTest2() {
Rule rule = new Rule(SERVICE_NAME, SERVICE_TYPE, CheckerCategory.HEAP_USAGE_RATE.getName(), 71, "testGroup", false, false, "");
Application application = new Application(SERVICE_NAME, ServiceType.STAND_ALONE);
AgentStatDataCollector collector = new AgentStatDataCollector(DataCollectorCategory.AGENT_STAT, application, jvmGcDao, cpuLoadDao, applicationIndexDao, System.currentTimeMillis(), DataCollectorFactory.SLOT_INTERVAL_FIVE_MIN);
AgentChecker checker = new HeapUsageRateChecker(collector, rule);
checker.check();
assertFalse(checker.isDetected());
}
Aggregations