@GetMapping(value = "/getOnlyResponseTimeHistogramDataV2")
    public NodeHistogramSummaryView getResponseTimeHistogramDataV2(
            @Valid @ModelAttribute
            ApplicationForm appForm,
            @Valid @ModelAttribute
            RangeForm rangeForm,
            @Valid @ModelAttribute
            SearchDepthForm depthForm,
            @RequestParam(value = "bidirectional", defaultValue = "true", required = false) boolean bidirectional,
            @RequestParam(value = "wasOnly", defaultValue = "false", required = false) boolean wasOnly,
            @RequestParam(value = "useStatisticsAgentState", defaultValue = "false", required = false)
            boolean useStatisticsAgentState
    ) {
        final Range range = toRange(rangeForm);
        TimeWindow timeWindow = new TimeWindow(range);

        final SearchOption searchOption = searchOptionBuilder()
                .build(depthForm.getCallerRange(), depthForm.getCalleeRange(), bidirectional, wasOnly);

        final Application application = getApplication(appForm);

        final MapServiceOption option = new MapServiceOption
                .Builder(application, timeWindow, searchOption)
                .setUseStatisticsAgentState(useStatisticsAgentState)
                .build();

        final TimeHistogramFormat format = TimeHistogramFormat.format(true);
        logger.info("Select ApplicationMap {} option={}", format, option);
        final LinkDataDuplexMap map = this.histogramService.selectLinkDataDuplexMap(option);

        final List<Application> fromApplications = this.histogramService.getFromApplications(map);
        final List<Application> toApplications = this.histogramService.getToApplications(map);
        final ResponseTimeHistogramServiceOption histogramServiceOption = new ResponseTimeHistogramServiceOption
                .Builder(application, timeWindow, fromApplications, toApplications)
                .setUseStatisticsAgentState(useStatisticsAgentState)
                .build();

        final NodeHistogramSummary nodeHistogramSummary = responseTimeHistogramService.selectNodeHistogramData(histogramServiceOption);

        ServerGroupList serverGroupList = nodeHistogramSummary.getServerGroupList();
        ServerGroupListView serverGroupListView = new ServerGroupListView(serverGroupList, hyperLinkFactory);
        return new NodeHistogramSummaryView(nodeHistogramSummary, serverGroupListView, format);
    }
@author emeroad
@author netspider
@author jaehong.kim
@author HyunGil Jeong
web/src/main/java/com/navercorp/pinpoint/web/applicationmap/controller/MapHistogramController.java