Search in sources :

Example 1 with ServerTime

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

the class ScatterChartController method selectScatterData.

private ModelAndView selectScatterData(String applicationName, Range range, int xGroupUnit, int yGroupUnit, int limit, boolean backwardDirection, int version) {
    ModelAndView mv = null;
    if (version == 1) {
        final ScatterData scatterData = scatter.selectScatterData(applicationName, range, xGroupUnit, yGroupUnit, limit, backwardDirection);
        boolean requestComplete = scatterData.getDotSize() < limit;
        mv = createScatterDataV1(scatterData, requestComplete);
    } else {
        mv = new ModelAndView();
    }
    mv.addObject("currentServerTime", new ServerTime().getCurrentServerTime());
    mv.addObject("from", range.getFrom());
    mv.addObject("to", range.getTo());
    return mv;
}
Also used : ModelAndView(org.springframework.web.servlet.ModelAndView) ServerTime(com.navercorp.pinpoint.web.view.ServerTime) ScatterData(com.navercorp.pinpoint.web.scatter.ScatterData)

Example 2 with ServerTime

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

the class ScatterChartController method selectFilterScatterData.

private ModelAndView selectFilterScatterData(String applicationName, Range range, int xGroupUnit, int yGroupUnit, int limit, boolean backwardDirection, String filterText, int version) {
    final LimitedScanResult<List<TransactionId>> limitedScanResult = flow.selectTraceIdsFromApplicationTraceIndex(applicationName, range, limit, backwardDirection);
    final List<TransactionId> transactionIdList = limitedScanResult.getScanData();
    logger.trace("submitted transactionId count={}", transactionIdList.size());
    boolean requestComplete = transactionIdList.size() < limit;
    Collections.sort(transactionIdList, TransactionIdComparator.INSTANCE);
    Filter filter = filterBuilder.build(filterText);
    ModelAndView mv;
    if (version == 1) {
        ScatterData scatterData = scatter.selectScatterData(transactionIdList, applicationName, range, xGroupUnit, yGroupUnit, filter);
        if (logger.isDebugEnabled()) {
            logger.debug("getScatterData range scan(limited:{}, backwardDirection:{}) from ~ to:{} ~ {}, limited:{}, filterDataSize:{}", limit, backwardDirection, DateUtils.longToDateStr(range.getFrom()), DateUtils.longToDateStr(range.getTo()), DateUtils.longToDateStr(limitedScanResult.getLimitedTime()), transactionIdList.size());
        }
        mv = createScatterDataV1(scatterData, requestComplete);
    } else {
        mv = new ModelAndView();
    }
    mv.addObject("currentServerTime", new ServerTime().getCurrentServerTime());
    mv.addObject("from", range.getFrom());
    mv.addObject("to", range.getTo());
    return mv;
}
Also used : Filter(com.navercorp.pinpoint.web.filter.Filter) ModelAndView(org.springframework.web.servlet.ModelAndView) List(java.util.List) ServerTime(com.navercorp.pinpoint.web.view.ServerTime) ScatterData(com.navercorp.pinpoint.web.scatter.ScatterData) TransactionId(com.navercorp.pinpoint.common.util.TransactionId)

Aggregations

ScatterData (com.navercorp.pinpoint.web.scatter.ScatterData)2 ServerTime (com.navercorp.pinpoint.web.view.ServerTime)2 ModelAndView (org.springframework.web.servlet.ModelAndView)2 TransactionId (com.navercorp.pinpoint.common.util.TransactionId)1 Filter (com.navercorp.pinpoint.web.filter.Filter)1 List (java.util.List)1