use of com.navercorp.pinpoint.batch.alarm.collector.MapStatisticsCallerDataCollector in project pinpoint by naver.
the class SlowCountToCalleCheckerTest method checkTest.
@Test
public void checkTest() {
Application application = new Application(FROM_SERVICE_NAME, ServiceType.STAND_ALONE);
MapStatisticsCallerDataCollector dataCollector = new MapStatisticsCallerDataCollector(DataCollectorCategory.CALLER_STAT, application, dao, System.currentTimeMillis(), 300000);
Rule rule = new Rule(FROM_SERVICE_NAME, SERVICE_TYPE, CheckerCategory.SLOW_COUNT_TO_CALLEE.getName(), 7, "testGroup", false, false, false, TO_SERVICE_NAME + 1);
SlowCountToCalleeChecker checker = new SlowCountToCalleeChecker(dataCollector, rule);
checker.check();
assertTrue(checker.isDetected());
}
use of com.navercorp.pinpoint.batch.alarm.collector.MapStatisticsCallerDataCollector in project pinpoint by naver.
the class SlowRateToCalleCheckerTest method checkTest2.
@Test
public void checkTest2() {
Application application = new Application(FROM_SERVICE_NAME, ServiceType.STAND_ALONE);
MapStatisticsCallerDataCollector dataCollector = new MapStatisticsCallerDataCollector(DataCollectorCategory.CALLER_STAT, application, dao, System.currentTimeMillis(), 300000);
Rule rule = new Rule(FROM_SERVICE_NAME, SERVICE_TYPE, CheckerCategory.SLOW_RATE_TO_CALLEE.getName(), 71, "testGroup", false, false, false, TO_SERVICE_NAME + 1);
SlowRateToCalleeChecker checker = new SlowRateToCalleeChecker(dataCollector, rule);
checker.check();
assertFalse(checker.isDetected());
}
use of com.navercorp.pinpoint.batch.alarm.collector.MapStatisticsCallerDataCollector in project pinpoint by naver.
the class SlowRateToCalleCheckerTest method checkTest.
@Test
public void checkTest() {
Application application = new Application(FROM_SERVICE_NAME, ServiceType.STAND_ALONE);
MapStatisticsCallerDataCollector dataCollector = new MapStatisticsCallerDataCollector(DataCollectorCategory.CALLER_STAT, application, dao, System.currentTimeMillis(), 300000);
Rule rule = new Rule(FROM_SERVICE_NAME, SERVICE_TYPE, CheckerCategory.SLOW_RATE_TO_CALLEE.getName(), 70, "testGroup", false, false, false, TO_SERVICE_NAME + 1);
SlowRateToCalleeChecker checker = new SlowRateToCalleeChecker(dataCollector, rule);
checker.check();
assertTrue(checker.isDetected());
}
use of com.navercorp.pinpoint.batch.alarm.collector.MapStatisticsCallerDataCollector in project pinpoint by pinpoint-apm.
the class ErrorCountToCalleCheckerTest method checkTest2.
@Test
public void checkTest2() {
Application application = new Application(FROM_SERVICE_NAME, ServiceType.STAND_ALONE);
MapStatisticsCallerDataCollector dataCollector = new MapStatisticsCallerDataCollector(DataCollectorCategory.CALLER_STAT, application, dao, System.currentTimeMillis(), 300000);
Rule rule = new Rule(FROM_SERVICE_NAME, SERVICE_TYPE, CheckerCategory.ERROR_COUNT_TO_CALLEE.getName(), 6, "testGroup", false, false, false, TO_SERVICE_NAME + 1);
ErrorCountToCalleeChecker checker = new ErrorCountToCalleeChecker(dataCollector, rule);
checker.check();
assertFalse(checker.isDetected());
}
use of com.navercorp.pinpoint.batch.alarm.collector.MapStatisticsCallerDataCollector in project pinpoint by pinpoint-apm.
the class ErrorCountToCalleCheckerTest method checkTest.
@Test
public void checkTest() {
Application application = new Application(FROM_SERVICE_NAME, ServiceType.STAND_ALONE);
MapStatisticsCallerDataCollector dataCollector = new MapStatisticsCallerDataCollector(DataCollectorCategory.CALLER_STAT, application, dao, System.currentTimeMillis(), 300000);
Rule rule = new Rule(FROM_SERVICE_NAME, SERVICE_TYPE, CheckerCategory.ERROR_COUNT_TO_CALLEE.getName(), 5, "testGroup", false, false, false, TO_SERVICE_NAME + 1);
ErrorCountToCalleeChecker checker = new ErrorCountToCalleeChecker(dataCollector, rule);
checker.check();
assertTrue(checker.isDetected());
}
Aggregations