use of com.navercorp.pinpoint.web.applicationmap.rawdata.LinkDataMap in project pinpoint by naver.
the class WasOnlyProcessorTest method shouldFilterLinksToUnknownNodes.
@Test
public void shouldFilterLinksToUnknownNodes() {
// Given
Application fromApplication = new Application("WAS", ServiceType.TEST_STAND_ALONE);
Application toApplication = new Application("UNKNOWN", ServiceType.UNKNOWN);
LinkData wasToUnknownLinkData = new LinkData(fromApplication, toApplication);
LinkDataMap linkDataMap = new LinkDataMap();
linkDataMap.addLinkData(wasToUnknownLinkData);
// When
WasOnlyProcessor wasOnlyProcessor = new WasOnlyProcessor();
LinkDataMap filteredLinkDataMap = wasOnlyProcessor.processLinkDataMap(linkDataMap, testRange);
// Then
Assert.assertTrue(filteredLinkDataMap.getLinkDataList().isEmpty());
}
use of com.navercorp.pinpoint.web.applicationmap.rawdata.LinkDataMap in project pinpoint by naver.
the class WasOnlyProcessorTest method shouldNotFilterLinksToQueueNodes.
@Test
public void shouldNotFilterLinksToQueueNodes() {
// Given
Application fromApplication = new Application("WAS", ServiceType.TEST_STAND_ALONE);
Application toApplication = new Application("QUEUE", ServiceTypeFactory.of(8888, "QUEUE", ServiceTypeProperty.QUEUE));
LinkData wasToQueueLinkData = new LinkData(fromApplication, toApplication);
LinkDataMap linkDataMap = new LinkDataMap();
linkDataMap.addLinkData(wasToQueueLinkData);
// When
WasOnlyProcessor wasOnlyProcessor = new WasOnlyProcessor();
LinkDataMap filteredLinkDataMap = wasOnlyProcessor.processLinkDataMap(linkDataMap, testRange);
// Then
Assert.assertFalse(filteredLinkDataMap.getLinkDataList().isEmpty());
}
use of com.navercorp.pinpoint.web.applicationmap.rawdata.LinkDataMap in project pinpoint by naver.
the class WasOnlyProcessorTest method shouldNotFilterLinksToWasNodes.
@Test
public void shouldNotFilterLinksToWasNodes() {
// Given
Application fromApplication = new Application("WAS_FROM", ServiceType.TEST_STAND_ALONE);
Application toApplication = new Application("WAS_TO", ServiceType.TEST_STAND_ALONE);
LinkData wasToWasLinkData = new LinkData(fromApplication, toApplication);
LinkDataMap linkDataMap = new LinkDataMap();
linkDataMap.addLinkData(wasToWasLinkData);
// When
WasOnlyProcessor wasOnlyProcessor = new WasOnlyProcessor();
LinkDataMap filteredLinkDataMap = wasOnlyProcessor.processLinkDataMap(linkDataMap, testRange);
// Then
Assert.assertFalse(filteredLinkDataMap.getLinkDataList().isEmpty());
}
use of com.navercorp.pinpoint.web.applicationmap.rawdata.LinkDataMap in project pinpoint by naver.
the class MapStatisticsCallerDataCollector method collect.
@Override
public void collect() {
if (init.get()) {
return;
}
LinkDataMap callerDataMap = mapStatisticsCallerDao.selectCaller(application, new Range(timeSlotEndTime - slotInterval, timeSlotEndTime));
for (LinkData linkData : callerDataMap.getLinkDataList()) {
LinkCallDataMap linkCallDataMap = linkData.getLinkCallDataMap();
for (LinkCallData linkCallData : linkCallDataMap.getLinkDataList()) {
calleStatMap.put(linkCallData.getTarget(), linkCallData);
}
}
init.set(true);
}
use of com.navercorp.pinpoint.web.applicationmap.rawdata.LinkDataMap in project pinpoint by naver.
the class DefaultApplicationMapCreator method createMap.
@Override
public LinkDataDuplexMap createMap(Application application, LinkSelectContext linkSelectContext) {
logger.debug("Finding Caller/Callee link data for {}", application);
final Range range = linkSelectContext.getRange();
LinkDataDuplexMap searchResult = new LinkDataDuplexMap();
final boolean searchCallerNode = linkSelectContext.checkNextCaller(application);
if (searchCallerNode) {
logger.debug("Finding Caller link data for {}", application);
final LinkDataMap callerLinkDataMap = linkDataMapService.selectCallerLinkDataMap(application, range);
logger.debug("Found Caller. count={}, caller={}, depth={}", callerLinkDataMap.size(), application, linkSelectContext.getCallerDepth());
final LinkDataMap processedCallerLinkDataMap = callerLinkDataMapProcessor.processLinkDataMap(callerLinkDataMap, range);
for (LinkData callerLinkData : processedCallerLinkDataMap.getLinkDataList()) {
searchResult.addSourceLinkData(callerLinkData);
final Application toApplication = callerLinkData.getToApplication();
// skip if nextApplication is a terminal or an unknown cloud
if (toApplication.getServiceType().isTerminal() || toApplication.getServiceType().isUnknown()) {
continue;
}
linkSelectContext.addNextApplication(toApplication);
}
}
final boolean searchCalleeNode = linkSelectContext.checkNextCallee(application);
if (searchCalleeNode) {
logger.debug("Finding Callee link data for {}", application);
final LinkDataMap calleeLinkDataMap = linkDataMapService.selectCalleeLinkDataMap(application, range);
logger.debug("Found Callee. count={}, callee={}, depth={}", calleeLinkDataMap.size(), application, linkSelectContext.getCalleeDepth());
final LinkDataMap processedCalleeLinkDataMap = calleeLinkDataMapProcessor.processLinkDataMap(calleeLinkDataMap, range);
for (LinkData calleeLinkData : processedCalleeLinkDataMap.getLinkDataList()) {
searchResult.addTargetLinkData(calleeLinkData);
final Application fromApplication = calleeLinkData.getFromApplication();
linkSelectContext.addNextApplication(fromApplication);
}
}
return searchResult;
}
Aggregations