use of com.navercorp.pinpoint.web.vo.stat.chart.application.ApplicationDataSourceChart in project pinpoint by naver.
the class ApplicationDataSourceService method selectApplicationChart.
public List<StatChart> selectApplicationChart(String applicationId, TimeWindow timeWindow) {
Objects.requireNonNull(applicationId, "applicationId");
Objects.requireNonNull(timeWindow, "timeWindow");
List<StatChart> result = new ArrayList<>();
List<AggreJoinDataSourceListBo> aggreJoinDataSourceListBoList = this.applicationDataSourceDao.getApplicationStatList(applicationId, timeWindow);
if (aggreJoinDataSourceListBoList.isEmpty()) {
result.add(new ApplicationDataSourceChart(timeWindow, "", "", Collections.emptyList()));
return result;
}
Map<DataSourceKey, List<AggreJoinDataSourceBo>> aggreJoinDataSourceBoMap = classifyByDataSourceUrl(aggreJoinDataSourceListBoList);
for (Map.Entry<DataSourceKey, List<AggreJoinDataSourceBo>> entry : aggreJoinDataSourceBoMap.entrySet()) {
DataSourceKey dataSourceKey = entry.getKey();
String serviceTypeName = serviceTypeRegistryService.findServiceType(dataSourceKey.getServiceTypeCode()).getName();
result.add(new ApplicationDataSourceChart(timeWindow, dataSourceKey.getUrl(), serviceTypeName, entry.getValue()));
}
return result;
}
Aggregations