public JsonFields<AgentNameView, List<TimeHistogramViewModel>> createViewModel(TimeHistogramFormat timeHistogramFormat) {

        JsonFields.Builder<AgentNameView, List<TimeHistogramViewModel>> builder = JsonFields.newBuilder();
        builder.comparator(AGENT_NAME_COMPARATOR);
        for (AgentHistogram agentHistogram : agentHistogramList.getAgentHistogramList()) {
            Application agentId = agentHistogram.getAgentId();
            List<TimeHistogram> timeList = histogramOrdering.sortedCopy(agentHistogram.getTimeHistogram());
            JsonField<AgentNameView, List<TimeHistogramViewModel>> model = createAgentResponseTimeViewModel(agentId, timeList, timeHistogramFormat);
            builder.addField(model);
        }
        return builder.build();
    }
most of the features have been delegated to AgentHistogramList upon refactoring
TODO: functionality reduced to creating views - need to be renamed or removed

@author emeroad
web/src/main/java/com/navercorp/pinpoint/web/applicationmap/histogram/AgentTimeHistogram.java