use of com.navercorp.pinpoint.batch.alarm.collector.ResponseTimeDataCollector in project pinpoint by naver.
the class SlowCountCheckerTest method checkTest1.
/*
* alert conditions not satisfied
*/
@Test
public void checkTest1() {
Application application = new Application(SERVICE_NAME, ServiceType.STAND_ALONE);
ResponseTimeDataCollector collector = new ResponseTimeDataCollector(DataCollectorCategory.RESPONSE_TIME, application, mockMapResponseDAO, System.currentTimeMillis(), 300000);
Rule rule = new Rule(SERVICE_NAME, SERVICE_TYPE, CheckerCategory.SLOW_COUNT.getName(), 74, "testGroup", false, false, false, "");
SlowCountChecker checker = new SlowCountChecker(collector, rule);
checker.check();
assertTrue(checker.isDetected());
}
use of com.navercorp.pinpoint.batch.alarm.collector.ResponseTimeDataCollector in project pinpoint by naver.
the class SlowRateCheckerTest method checkTest1.
/*
* not satisfied with alert condition
*/
@Test
public void checkTest1() {
Application application = new Application(SERVICE_NAME, ServiceType.STAND_ALONE);
ResponseTimeDataCollector collector = new ResponseTimeDataCollector(DataCollectorCategory.RESPONSE_TIME, application, mockMapResponseDAO, System.currentTimeMillis(), 300000);
Rule rule = new Rule(SERVICE_NAME, SERVICE_TYPE, CheckerCategory.SLOW_RATE.getName(), 60, "testGroup", false, false, false, "");
SlowRateChecker filter = new SlowRateChecker(collector, rule);
filter.check();
assertTrue(filter.isDetected());
}
Aggregations