@PostMapping(value = "/getResponseTimeHistogramDataV2")
    public NodeHistogramSummaryView postResponseTimeHistogramDataV2(
            @Valid @ModelAttribute
            ApplicationForm appForm,
            @Valid @ModelAttribute
            RangeForm rangeForm,
            @RequestBody ApplicationPairs applicationPairs,
            @RequestParam(value = "useStatisticsAgentState", defaultValue = "true", required = false)
            boolean useStatisticsAgentState,
            @RequestParam(value = "useLoadHistogramFormat", defaultValue = "false", required = false)
            boolean useLoadHistogramFormat
    ) {
        final Range range = toRange(rangeForm);
        TimeWindow timeWindow = new TimeWindow(range);

        final Application application = getApplication(appForm);

        final List<Application> fromApplications =
                mapApplicationPairsToApplications(applicationPairs.getFromApplications());
        final List<Application> toApplications =
                mapApplicationPairsToApplications(applicationPairs.getToApplications());
        final ResponseTimeHistogramServiceOption option = new ResponseTimeHistogramServiceOption
                .Builder(application, timeWindow, fromApplications, toApplications)
                .setUseStatisticsAgentState(useStatisticsAgentState)
                .build();
        final NodeHistogramSummary nodeHistogramSummary = responseTimeHistogramService.selectNodeHistogramData(option);

        TimeHistogramFormat format = TimeHistogramFormat.format(useLoadHistogramFormat);
        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