use of com.navercorp.pinpoint.web.vo.ResponseTime in project pinpoint by naver.
the class ApplicationMapBuilder method build.
public ApplicationMap build(LinkDataDuplexMap linkDataDuplexMap, final AgentInfoService agentInfoService, final ResponseHistogramBuilder mapHistogramSummary) {
AgentInfoPopulator agentInfoPopulator = new AgentInfoPopulator() {
@Override
public void addAgentInfos(Node node) {
ServerInstanceList serverInstanceList = getServerInstanceList(node, agentInfoService);
node.setServerInstanceList(serverInstanceList);
}
};
NodeHistogramDataSource responseSource = new NodeHistogramDataSource() {
@Override
public NodeHistogram createNodeHistogram(Application application) {
List<ResponseTime> responseHistogram = mapHistogramSummary.getResponseTimeList(application);
final NodeHistogram nodeHistogram = new NodeHistogram(application, range, responseHistogram);
return nodeHistogram;
}
};
return this.build(linkDataDuplexMap, agentInfoPopulator, responseSource);
}
use of com.navercorp.pinpoint.web.vo.ResponseTime in project pinpoint by naver.
the class ApplicationMapBuilder method build.
public ApplicationMap build(LinkDataDuplexMap linkDataDuplexMap, final AgentInfoService agentInfoService, final MapResponseDao mapResponseDao) {
AgentInfoPopulator agentInfoPopulator = new AgentInfoPopulator() {
@Override
public void addAgentInfos(Node node) {
ServerInstanceList serverInstanceList = getServerInstanceList(node, agentInfoService);
node.setServerInstanceList(serverInstanceList);
}
};
NodeHistogramDataSource responseSource = new NodeHistogramDataSource() {
@Override
public NodeHistogram createNodeHistogram(Application application) {
final List<ResponseTime> responseHistogram = mapResponseDao.selectResponseTime(application, range);
final NodeHistogram nodeHistogram = new NodeHistogram(application, range, responseHistogram);
return nodeHistogram;
}
};
return this.build(linkDataDuplexMap, agentInfoPopulator, responseSource);
}
use of com.navercorp.pinpoint.web.vo.ResponseTime in project pinpoint by naver.
the class ApplicationTimeHistogramBuilder method build.
public ApplicationTimeHistogram build(List<ResponseTime> responseHistogramList) {
Objects.requireNonNull(responseHistogramList, "responseHistogramList");
Map<Long, TimeHistogram> applicationLevelHistogram = new HashMap<>();
for (ResponseTime responseTime : responseHistogramList) {
final Long timeStamp = responseTime.getTimeStamp();
TimeHistogram timeHistogram = applicationLevelHistogram.get(timeStamp);
if (timeHistogram == null) {
timeHistogram = new TimeHistogram(application.getServiceType(), timeStamp);
applicationLevelHistogram.put(timeStamp, timeHistogram);
}
// add each agent-level data
Histogram applicationResponseHistogram = responseTime.getApplicationResponseHistogram();
timeHistogram.add(applicationResponseHistogram);
}
// Collections.sort(histogramList, TimeHistogram.TIME_STAMP_ASC_COMPARATOR);
List<TimeHistogram> histogramList = interpolation(applicationLevelHistogram.values());
if (logger.isTraceEnabled()) {
for (TimeHistogram histogram : histogramList) {
logger.trace("applicationLevel histogram:{}", histogram);
}
}
ApplicationTimeHistogram applicationTimeHistogram = new ApplicationTimeHistogram(application, range, histogramList);
return applicationTimeHistogram;
}
use of com.navercorp.pinpoint.web.vo.ResponseTime in project pinpoint by naver.
the class HbaseMapResponseTimeDao method selectResponseTime.
@Override
public List<ResponseTime> selectResponseTime(Application application, Range range) {
Objects.requireNonNull(application, "application");
if (logger.isDebugEnabled()) {
logger.debug("selectResponseTime applicationName:{}, {}", application, range);
}
Scan scan = createScan(application, range, DESCRIPTOR.getName());
TableName mapStatisticsSelfTableName = tableNameProvider.getTableName(DESCRIPTOR.getTable());
List<ResponseTime> responseTimeList = hbaseOperations2.findParallel(mapStatisticsSelfTableName, scan, rowKeyDistributorByHashPrefix, responseTimeMapper, MAP_STATISTICS_SELF_VER2_NUM_PARTITIONS);
if (!responseTimeList.isEmpty()) {
return responseTimeList;
}
return new ArrayList<>();
}
use of com.navercorp.pinpoint.web.vo.ResponseTime in project pinpoint by naver.
the class ResponseTimeMapper method createResponseTime.
private ResponseTime createResponseTime(byte[] rowKey) {
final Buffer row = new FixedBuffer(rowKey);
String applicationName = row.read2PrefixedString();
short serviceTypeCode = row.readShort();
final long timestamp = TimeUtils.recoveryTimeMillis(row.readLong());
ServiceType serviceType = registry.findServiceType(serviceTypeCode);
return new ResponseTime(applicationName, serviceType, timestamp);
}
Aggregations