use of com.att.aro.core.bestpractice.pojo.MultipleConnectionsEntry in project VideoOptimzer by attdevsupport.
the class MultipleSimultnsConnImpl method populateAllSimultConnList.
private void populateAllSimultConnList() {
List<Session> sessions = traceDataResult.getSessionlist();
if (sessions == null || sessions.size() <= 0) {
simultnsConnectionAllServersEntryList = Collections.emptyList();
return;
}
List<Session> tempSessionList = new ArrayList<Session>();
Map<String, ArrayList<Session>> distinctMap = simultnsUtil.getDistinctMap(sessions);
for (Map.Entry<String, ArrayList<Session>> entry : distinctMap.entrySet()) {
ArrayList<Session> tempList = entry.getValue();
for (int iterator = 0; iterator < tempList.size(); iterator++) {
tempSessionList.add(tempList.get(iterator));
}
}
List<SessionValues> sessionValuesList = simultnsUtil.createDomainsTCPSessions(tempSessionList);
MultipleConnectionsEntry simultnsConnEntry = simultnsUtil.getTimeMap(sessionValuesList, maxConnections, true);
if (simultnsConnEntry != null) {
simultnsConnectionAllServersEntryMap.put(simultnsConnEntry.getStartTimeStamp(), simultnsConnEntry);
}
}
use of com.att.aro.core.bestpractice.pojo.MultipleConnectionsEntry in project VideoOptimzer by attdevsupport.
the class MultipleSimultnsConnImpl method runTest.
@Override
public AbstractBestPracticeResult runTest(PacketAnalyzerResult traceData) {
traceDataResult = traceData;
MultiSimultnsConnectionResult result = new MultiSimultnsConnectionResult();
simultnsConnectionAllServersEntryList = new ArrayList<MultipleConnectionsEntry>();
simultnsConnectionAllServersEntryMap = new TreeMap<Double, MultipleConnectionsEntry>();
populateAllSimultConnList();
for (Map.Entry<Double, MultipleConnectionsEntry> simultnsConnAllServersEntryMap : simultnsConnectionAllServersEntryMap.entrySet()) {
if (simultnsConnAllServersEntryMap.getValue() != null) {
simultnsConnectionAllServersEntryList.add(simultnsConnAllServersEntryMap.getValue());
}
}
result.setResults(simultnsConnectionAllServersEntryList);
String text = "";
if (simultnsConnectionAllServersEntryList.isEmpty()) {
result.setResultType(BPResultType.PASS);
text = MessageFormat.format(textResultPass, simultnsConnectionAllServersEntryList.size());
result.setResultText(text);
result.setResultExcelText(BPResultType.PASS.getDescription());
} else {
result.setResultType(BPResultType.FAIL);
result.setResultText(textResults);
// TODO: Validate conditional statement
result.setResultExcelText(MessageFormat.format(textExcelResults, BPResultType.FAIL.getDescription(), simultnsConnectionAllServersEntryList.parallelStream().mapToInt(x -> x.getConcurrentSessions()).sum(), (simultnsConnectionAllServersEntryList.size() > 1 ? "s" : "")));
}
result.setAboutText(aboutText);
result.setDetailTitle(detailTitle);
result.setLearnMoreUrl(learnMoreUrl);
result.setOverviewTitle(overviewTitle);
return result;
}
use of com.att.aro.core.bestpractice.pojo.MultipleConnectionsEntry in project VideoOptimzer by attdevsupport.
the class SimultnsConnImpl method populateSimultConnList.
private void populateSimultConnList() {
List<Session> sessions = traceDataResult.getSessionlist();
if (sessions == null || sessions.size() <= 0) {
simultnsConnectionEntryList = Collections.emptyList();
return;
}
Map<String, ArrayList<Session>> distinctMap = simultnsUtil.getDistinctMap(sessions);
HashMap<String, List<SessionValues>> ipMap = new HashMap<String, List<SessionValues>>();
for (Map.Entry<String, ArrayList<Session>> entry : distinctMap.entrySet()) {
ArrayList<Session> tempList = entry.getValue();
tempList.trimToSize();
List<SessionValues> timeMap = simultnsUtil.createDomainsTCPSessions(tempList);
ipMap.put(entry.getKey(), timeMap);
}
for (HashMap.Entry<String, List<SessionValues>> ipEntry : ipMap.entrySet()) {
MultipleConnectionsEntry simultnsConnEntry = simultnsUtil.getTimeMap(ipEntry.getValue(), maxConnections, false);
if (simultnsConnEntry != null) {
simultnsConnectionEntryMap.put(simultnsConnEntry.getStartTimeStamp(), simultnsConnEntry);
}
}
}
use of com.att.aro.core.bestpractice.pojo.MultipleConnectionsEntry in project VideoOptimzer by attdevsupport.
the class ARODiagnosticsOverviewRouteImpl method updateDiagnosticsTab.
@Override
public void updateDiagnosticsTab(Object routeInfo) {
int oldPanelIndex = jtabbedPane.getSelectedIndex();
jtabbedPane.setSelectedIndex(DIAGNOSTIC_INDEX);
DiagnosticsTab diagnosticsTab = (DiagnosticsTab) jtabbedPane.getSelectedComponent();
if (routeInfo == null) {
jtabbedPane.setSelectedIndex(oldPanelIndex);
LOG.error("Diagnostics Tab needs a type for updating");
return;
}
LOG.debug("Type used to route to Diagnostics Tab: " + routeInfo.getClass().getSimpleName());
if (routeInfo instanceof CacheEntry) {
diagnosticsTab.setHighlightedTCP(((CacheEntry) routeInfo).getHttpRequestResponse());
} else if (routeInfo instanceof Session) {
diagnosticsTab.setHighlightedTCP(((Session) routeInfo));
} else if (routeInfo instanceof HttpRequestResponseInfo) {
diagnosticsTab.setHighlightedTCP((HttpRequestResponseInfo) routeInfo);
} else if (routeInfo instanceof HttpEntry) {
diagnosticsTab.setHighlightedTCP(((HttpEntry) routeInfo).getHttpRequestResponse());
} else if (routeInfo instanceof DisplayNoneInCSSEntry) {
diagnosticsTab.setHighlightedTCP(((DisplayNoneInCSSEntry) routeInfo).getHttpRequestResponse());
} else if (routeInfo instanceof ImageMdataEntry) {
diagnosticsTab.setHighlightedTCP(((ImageMdataEntry) routeInfo).getHttpRequestResponse());
} else if (routeInfo instanceof ImageCompressionEntry) {
diagnosticsTab.setHighlightedTCP(((ImageCompressionEntry) routeInfo).getHttpRequestResponse());
} else if (routeInfo instanceof MultipleConnectionsEntry) {
if (((MultipleConnectionsEntry) routeInfo).isMultiple()) {
jtabbedPane.setSelectedIndex(WATERFALL_INDEX);
WaterfallTab waterfallTab = (WaterfallTab) jtabbedPane.getSelectedComponent();
waterfallTab.updateGraph(((MultipleConnectionsEntry) routeInfo).getHttpReqRespInfo());
} else {
if (((MultipleConnectionsEntry) routeInfo).getHttpReqRespInfo().getSession() != null) {
diagnosticsTab.setHighlightedSessionTCP(((MultipleConnectionsEntry) routeInfo).getHttpReqRespInfo());
} else {
diagnosticsTab.setHighlightedTCP(((MultipleConnectionsEntry) routeInfo).getHttpReqRespInfo());
}
}
} else if (routeInfo instanceof SpriteImageEntry) {
diagnosticsTab.setHighlightedTCP(((SpriteImageEntry) routeInfo).getHttpRequestResponse());
} else if (routeInfo instanceof UnnecessaryConnectionEntry) {
UnnecessaryConnectionEntry unConnectionEntry = (UnnecessaryConnectionEntry) routeInfo;
diagnosticsTab.setHighlightedTCP(unConnectionEntry.getLowTime());
} else if (routeInfo instanceof TransmissionPrivateDataEntry || routeInfo instanceof UnsecureSSLVersionEntry || routeInfo instanceof ForwardSecrecyEntry) {
diagnosticsTab.setHighlightedTCP(routeInfo);
} else if (routeInfo instanceof VideoStall) {
double timestamp = ((VideoStall) routeInfo).getSegmentTryingToPlay().getStartTS();
diagnosticsTab.getGraphPanel().setGraphView(timestamp, true);
diagnosticsTab.getVideoPlayer().setMediaTime(timestamp);
} else {
jtabbedPane.setSelectedIndex(oldPanelIndex);
LOG.error("Diagnostics Tab cannot handle a type of " + routeInfo.getClass().getSimpleName() + " for updating");
}
}
use of com.att.aro.core.bestpractice.pojo.MultipleConnectionsEntry in project VideoOptimzer by attdevsupport.
the class SimultnsConnImpl method runTest.
@Override
public AbstractBestPracticeResult runTest(PacketAnalyzerResult traceData) {
traceDataResult = traceData;
SimultnsConnectionResult result = new SimultnsConnectionResult();
simultnsConnectionEntryList = new ArrayList<MultipleConnectionsEntry>();
simultnsConnectionEntryMap = new TreeMap<Double, MultipleConnectionsEntry>();
populateSimultConnList();
for (Map.Entry<Double, MultipleConnectionsEntry> simultnsConnEntryMap : simultnsConnectionEntryMap.entrySet()) {
if (simultnsConnEntryMap.getValue() != null) {
simultnsConnectionEntryList.add(simultnsConnEntryMap.getValue());
}
}
result.setResults(simultnsConnectionEntryList);
String text = "";
if (simultnsConnectionEntryList.isEmpty()) {
result.setResultType(BPResultType.PASS);
text = textResultPass;
result.setResultText(text);
result.setResultExcelText(BPResultType.PASS.getDescription());
} else {
result.setResultType(BPResultType.FAIL);
result.setResultText(textResults);
// TODO: Validate the conditional statement
result.setResultExcelText(MessageFormat.format(textExcelResults, BPResultType.FAIL.getDescription(), simultnsConnectionEntryList.parallelStream().mapToInt(x -> x.getConcurrentSessions()).sum(), (simultnsConnectionEntryList.size() > 1 ? "s" : "")));
}
result.setAboutText(aboutText);
result.setDetailTitle(detailTitle);
result.setLearnMoreUrl(learnMoreUrl);
result.setOverviewTitle(overviewTitle);
return result;
}
Aggregations