Search in sources :

Example 11 with ResponseTime

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);
}
Also used : ApplicationTimeHistogram(com.navercorp.pinpoint.web.applicationmap.histogram.ApplicationTimeHistogram) ApplicationTimeHistogramBuilder(com.navercorp.pinpoint.web.applicationmap.histogram.ApplicationTimeHistogramBuilder) ResponseTimeViewModel(com.navercorp.pinpoint.web.view.ResponseTimeViewModel) ObjectWriter(com.fasterxml.jackson.databind.ObjectWriter) ResponseTime(com.navercorp.pinpoint.web.vo.ResponseTime) Range(com.navercorp.pinpoint.web.vo.Range) Application(com.navercorp.pinpoint.web.vo.Application) Test(org.junit.Test)

Example 12 with ResponseTime

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);
}
Also used : ResponseTime(com.navercorp.pinpoint.web.vo.ResponseTime) Range(com.navercorp.pinpoint.web.vo.Range)

Aggregations

ResponseTime (com.navercorp.pinpoint.web.vo.ResponseTime)12 Application (com.navercorp.pinpoint.web.vo.Application)4 Range (com.navercorp.pinpoint.web.vo.Range)3 Test (org.junit.Test)3 Buffer (com.navercorp.pinpoint.common.buffer.Buffer)2 NodeHistogram (com.navercorp.pinpoint.web.applicationmap.histogram.NodeHistogram)2 ArrayList (java.util.ArrayList)2 Cell (org.apache.hadoop.hbase.Cell)2 JsonFactory (com.fasterxml.jackson.core.JsonFactory)1 JsonGenerator (com.fasterxml.jackson.core.JsonGenerator)1 ObjectWriter (com.fasterxml.jackson.databind.ObjectWriter)1 AutomaticBuffer (com.navercorp.pinpoint.common.buffer.AutomaticBuffer)1 FixedBuffer (com.navercorp.pinpoint.common.buffer.FixedBuffer)1 HistogramSlot (com.navercorp.pinpoint.common.trace.HistogramSlot)1 ServiceType (com.navercorp.pinpoint.common.trace.ServiceType)1 AgentTimeHistogram (com.navercorp.pinpoint.web.applicationmap.histogram.AgentTimeHistogram)1 AgentTimeHistogramBuilder (com.navercorp.pinpoint.web.applicationmap.histogram.AgentTimeHistogramBuilder)1 ApplicationTimeHistogram (com.navercorp.pinpoint.web.applicationmap.histogram.ApplicationTimeHistogram)1 ApplicationTimeHistogramBuilder (com.navercorp.pinpoint.web.applicationmap.histogram.ApplicationTimeHistogramBuilder)1 Histogram (com.navercorp.pinpoint.web.applicationmap.histogram.Histogram)1