use of com.navercorp.pinpoint.web.vo.ResponseTime in project pinpoint by naver.
the class ApplicationTimeHistogramTest method testViewModel.
@Test
public void testViewModel() throws IOException {
Application app = new Application("test", ServiceType.STAND_ALONE);
ApplicationTimeHistogramBuilder builder = new ApplicationTimeHistogramBuilder(app, new Range(0, 10 * 6000));
List<ResponseTime> responseHistogramList = createResponseTime(app);
ApplicationTimeHistogram histogram = builder.build(responseHistogramList);
List<ResponseTimeViewModel> viewModel = histogram.createViewModel();
logger.debug("{}", viewModel);
ObjectWriter writer = mapper.writer();
String s = writer.writeValueAsString(viewModel);
logger.debug(s);
}
use of com.navercorp.pinpoint.web.vo.ResponseTime in project pinpoint by naver.
the class ResponseTimeDataCollector method collect.
@Override
public void collect() {
if (init.get()) {
return;
}
Range range = Range.createUncheckedRange(timeSlotEndTime - slotInterval, timeSlotEndTime);
List<ResponseTime> responseTimes = responseDao.selectResponseTime(application, range);
for (ResponseTime responseTime : responseTimes) {
sum(responseTime.getAgentResponseHistogramList());
}
setSlowRate();
setErrorRate();
init.set(true);
}
Aggregations