Search in sources :

Example 1 with MapStatisticsCallerDataCollector

use of com.navercorp.pinpoint.batch.alarm.collector.MapStatisticsCallerDataCollector in project pinpoint by naver.

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());
}
Also used : MapStatisticsCallerDataCollector(com.navercorp.pinpoint.batch.alarm.collector.MapStatisticsCallerDataCollector) Rule(com.navercorp.pinpoint.web.alarm.vo.Rule) Application(com.navercorp.pinpoint.web.vo.Application) Test(org.junit.Test)

Example 2 with MapStatisticsCallerDataCollector

use of com.navercorp.pinpoint.batch.alarm.collector.MapStatisticsCallerDataCollector in project pinpoint by naver.

the class ErrorCountToCalleCheckerTest method checkTest3.

@Test
public void checkTest3() {
    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 + 2);
    ErrorCountToCalleeChecker checker = new ErrorCountToCalleeChecker(dataCollector, rule);
    checker.check();
    assertTrue(checker.isDetected());
}
Also used : MapStatisticsCallerDataCollector(com.navercorp.pinpoint.batch.alarm.collector.MapStatisticsCallerDataCollector) Rule(com.navercorp.pinpoint.web.alarm.vo.Rule) Application(com.navercorp.pinpoint.web.vo.Application) Test(org.junit.Test)

Example 3 with MapStatisticsCallerDataCollector

use of com.navercorp.pinpoint.batch.alarm.collector.MapStatisticsCallerDataCollector in project pinpoint by naver.

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());
}
Also used : MapStatisticsCallerDataCollector(com.navercorp.pinpoint.batch.alarm.collector.MapStatisticsCallerDataCollector) Rule(com.navercorp.pinpoint.web.alarm.vo.Rule) Application(com.navercorp.pinpoint.web.vo.Application) Test(org.junit.Test)

Example 4 with MapStatisticsCallerDataCollector

use of com.navercorp.pinpoint.batch.alarm.collector.MapStatisticsCallerDataCollector in project pinpoint by naver.

the class SlowCountToCalleCheckerTest 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_COUNT_TO_CALLEE.getName(), 8, "testGroup", false, false, false, TO_SERVICE_NAME + 1);
    SlowCountToCalleeChecker checker = new SlowCountToCalleeChecker(dataCollector, rule);
    checker.check();
    assertFalse(checker.isDetected());
}
Also used : MapStatisticsCallerDataCollector(com.navercorp.pinpoint.batch.alarm.collector.MapStatisticsCallerDataCollector) Rule(com.navercorp.pinpoint.web.alarm.vo.Rule) Application(com.navercorp.pinpoint.web.vo.Application) Test(org.junit.Test)

Example 5 with MapStatisticsCallerDataCollector

use of com.navercorp.pinpoint.batch.alarm.collector.MapStatisticsCallerDataCollector in project pinpoint by naver.

the class SlowRateToCalleCheckerTest method checkTest3.

@Test
public void checkTest3() {
    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(), 90, "testGroup", false, false, false, TO_SERVICE_NAME + 2);
    SlowRateToCalleeChecker checker = new SlowRateToCalleeChecker(dataCollector, rule);
    checker.check();
    assertTrue(checker.isDetected());
}
Also used : MapStatisticsCallerDataCollector(com.navercorp.pinpoint.batch.alarm.collector.MapStatisticsCallerDataCollector) Rule(com.navercorp.pinpoint.web.alarm.vo.Rule) Application(com.navercorp.pinpoint.web.vo.Application) Test(org.junit.Test)

Aggregations

MapStatisticsCallerDataCollector (com.navercorp.pinpoint.batch.alarm.collector.MapStatisticsCallerDataCollector)32 Rule (com.navercorp.pinpoint.web.alarm.vo.Rule)32 Application (com.navercorp.pinpoint.web.vo.Application)30 Test (org.junit.Test)30 AlarmChecker (com.navercorp.pinpoint.batch.alarm.checker.AlarmChecker)2 DataSourceConnectionUsageRateChecker (com.navercorp.pinpoint.batch.alarm.checker.DataSourceConnectionUsageRateChecker)2 DeadlockChecker (com.navercorp.pinpoint.batch.alarm.checker.DeadlockChecker)2 ErrorCountChecker (com.navercorp.pinpoint.batch.alarm.checker.ErrorCountChecker)2 ErrorCountToCalleeChecker (com.navercorp.pinpoint.batch.alarm.checker.ErrorCountToCalleeChecker)2 ErrorRateChecker (com.navercorp.pinpoint.batch.alarm.checker.ErrorRateChecker)2 ErrorRateToCalleeChecker (com.navercorp.pinpoint.batch.alarm.checker.ErrorRateToCalleeChecker)2 FileDescriptorChecker (com.navercorp.pinpoint.batch.alarm.checker.FileDescriptorChecker)2 HeapUsageRateChecker (com.navercorp.pinpoint.batch.alarm.checker.HeapUsageRateChecker)2 JvmCpuUsageRateChecker (com.navercorp.pinpoint.batch.alarm.checker.JvmCpuUsageRateChecker)2 ResponseCountChecker (com.navercorp.pinpoint.batch.alarm.checker.ResponseCountChecker)2 SlowCountChecker (com.navercorp.pinpoint.batch.alarm.checker.SlowCountChecker)2 SlowCountToCalleeChecker (com.navercorp.pinpoint.batch.alarm.checker.SlowCountToCalleeChecker)2 SlowRateChecker (com.navercorp.pinpoint.batch.alarm.checker.SlowRateChecker)2 SlowRateToCalleeChecker (com.navercorp.pinpoint.batch.alarm.checker.SlowRateToCalleeChecker)2 SystemCpuUsageRateChecker (com.navercorp.pinpoint.batch.alarm.checker.SystemCpuUsageRateChecker)2