Search in sources :

Example 1 with ResponseTimeViewModel

use of com.navercorp.pinpoint.web.view.ResponseTimeViewModel in project pinpoint by naver.

the class AgentTimeHistogram method createAgentResponseTimeViewModel.

private AgentResponseTimeViewModel createAgentResponseTimeViewModel(Application agentName, List<TimeHistogram> timeHistogramList) {
    List<ResponseTimeViewModel> responseTimeViewModel = createResponseTimeViewModel(timeHistogramList);
    AgentResponseTimeViewModel agentResponseTimeViewModel = new AgentResponseTimeViewModel(agentName, responseTimeViewModel);
    return agentResponseTimeViewModel;
}
Also used : AgentResponseTimeViewModel(com.navercorp.pinpoint.web.view.AgentResponseTimeViewModel) AgentResponseTimeViewModel(com.navercorp.pinpoint.web.view.AgentResponseTimeViewModel) ResponseTimeViewModel(com.navercorp.pinpoint.web.view.ResponseTimeViewModel)

Example 2 with ResponseTimeViewModel

use of com.navercorp.pinpoint.web.view.ResponseTimeViewModel in project pinpoint by naver.

the class ApplicationTimeHistogram method createViewModel.

public List<ResponseTimeViewModel> createViewModel() {
    final List<ResponseTimeViewModel> value = new ArrayList<>(5);
    ServiceType serviceType = application.getServiceType();
    HistogramSchema schema = serviceType.getHistogramSchema();
    value.add(new ResponseTimeViewModel(schema.getFastSlot().getSlotName(), getColumnValue(SlotType.FAST)));
    //        value.add(new ResponseTimeViewModel(schema.getFastErrorSlot().getSlotName(), getColumnValue(SlotType.FAST_ERROR)));
    value.add(new ResponseTimeViewModel(schema.getNormalSlot().getSlotName(), getColumnValue(SlotType.NORMAL)));
    //        value.add(new ResponseTimeViewModel(schema.getNormalErrorSlot().getSlotName(), getColumnValue(SlotType.NORMAL_ERROR)));
    value.add(new ResponseTimeViewModel(schema.getSlowSlot().getSlotName(), getColumnValue(SlotType.SLOW)));
    //        value.add(new ResponseTimeViewModel(schema.getSlowErrorSlot().getSlotName(), getColumnValue(SlotType.SLOW_ERROR)));
    value.add(new ResponseTimeViewModel(schema.getVerySlowSlot().getSlotName(), getColumnValue(SlotType.VERY_SLOW)));
    //        value.add(new ResponseTimeViewModel(schema.getVerySlowErrorSlot().getSlotName(), getColumnValue(SlotType.VERY_SLOW_ERROR)));
    value.add(new ResponseTimeViewModel(schema.getErrorSlot().getSlotName(), getColumnValue(SlotType.ERROR)));
    return value;
}
Also used : HistogramSchema(com.navercorp.pinpoint.common.trace.HistogramSchema) ServiceType(com.navercorp.pinpoint.common.trace.ServiceType) ResponseTimeViewModel(com.navercorp.pinpoint.web.view.ResponseTimeViewModel)

Example 3 with ResponseTimeViewModel

use of com.navercorp.pinpoint.web.view.ResponseTimeViewModel 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 4 with ResponseTimeViewModel

use of com.navercorp.pinpoint.web.view.ResponseTimeViewModel in project pinpoint by naver.

the class AgentTimeHistogram method createResponseTimeViewModel.

public List<ResponseTimeViewModel> createResponseTimeViewModel(List<TimeHistogram> timeHistogramList) {
    final List<ResponseTimeViewModel> value = new ArrayList<>(5);
    ServiceType serviceType = application.getServiceType();
    HistogramSchema schema = serviceType.getHistogramSchema();
    value.add(new ResponseTimeViewModel(schema.getFastSlot().getSlotName(), getColumnValue(SlotType.FAST, timeHistogramList)));
    //        value.add(new ResponseTimeViewModel(schema.getFastErrorSlot().getSlotName(), getColumnValue(SlotType.FAST_ERROR, timeHistogramList)));
    value.add(new ResponseTimeViewModel(schema.getNormalSlot().getSlotName(), getColumnValue(SlotType.NORMAL, timeHistogramList)));
    //        value.add(new ResponseTimeViewModel(schema.getNormalErrorSlot().getSlotName(), getColumnValue(SlotType.NORMAL_ERROR, timeHistogramList)));
    value.add(new ResponseTimeViewModel(schema.getSlowSlot().getSlotName(), getColumnValue(SlotType.SLOW, timeHistogramList)));
    //        value.add(new ResponseTimeViewModel(schema.getSlowErrorSlot().getSlotName(), getColumnValue(SlotType.SLOW_ERROR, timeHistogramList)));
    value.add(new ResponseTimeViewModel(schema.getVerySlowSlot().getSlotName(), getColumnValue(SlotType.VERY_SLOW, timeHistogramList)));
    //        value.add(new ResponseTimeViewModel(schema.getVerySlowErrorSlot().getSlotName(), getColumnValue(SlotType.VERY_SLOW_ERROR, timeHistogramList)));
    value.add(new ResponseTimeViewModel(schema.getErrorSlot().getSlotName(), getColumnValue(SlotType.ERROR, timeHistogramList)));
    return value;
}
Also used : HistogramSchema(com.navercorp.pinpoint.common.trace.HistogramSchema) ServiceType(com.navercorp.pinpoint.common.trace.ServiceType) AgentResponseTimeViewModel(com.navercorp.pinpoint.web.view.AgentResponseTimeViewModel) ResponseTimeViewModel(com.navercorp.pinpoint.web.view.ResponseTimeViewModel)

Aggregations

ResponseTimeViewModel (com.navercorp.pinpoint.web.view.ResponseTimeViewModel)4 HistogramSchema (com.navercorp.pinpoint.common.trace.HistogramSchema)2 ServiceType (com.navercorp.pinpoint.common.trace.ServiceType)2 AgentResponseTimeViewModel (com.navercorp.pinpoint.web.view.AgentResponseTimeViewModel)2 ObjectWriter (com.fasterxml.jackson.databind.ObjectWriter)1 ApplicationTimeHistogram (com.navercorp.pinpoint.web.applicationmap.histogram.ApplicationTimeHistogram)1 ApplicationTimeHistogramBuilder (com.navercorp.pinpoint.web.applicationmap.histogram.ApplicationTimeHistogramBuilder)1 Application (com.navercorp.pinpoint.web.vo.Application)1 Range (com.navercorp.pinpoint.web.vo.Range)1 ResponseTime (com.navercorp.pinpoint.web.vo.ResponseTime)1 Test (org.junit.Test)1