Search in sources :

Example 1 with MultipleConnectionsEntry

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);
    }
}
Also used : MultipleConnectionsEntry(com.att.aro.core.bestpractice.pojo.MultipleConnectionsEntry) ArrayList(java.util.ArrayList) TreeMap(java.util.TreeMap) Map(java.util.Map) SortedMap(java.util.SortedMap) Session(com.att.aro.core.packetanalysis.pojo.Session) SessionValues(com.att.aro.core.packetanalysis.pojo.SessionValues)

Example 2 with MultipleConnectionsEntry

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;
}
Also used : BPResultType(com.att.aro.core.bestpractice.pojo.BPResultType) MultiSimultnsConnectionResult(com.att.aro.core.bestpractice.pojo.MultiSimultnsConnectionResult) Session(com.att.aro.core.packetanalysis.pojo.Session) SessionValues(com.att.aro.core.packetanalysis.pojo.SessionValues) MessageFormat(java.text.MessageFormat) ArrayList(java.util.ArrayList) Value(org.springframework.beans.factory.annotation.Value) AbstractBestPracticeResult(com.att.aro.core.bestpractice.pojo.AbstractBestPracticeResult) List(java.util.List) TreeMap(java.util.TreeMap) SimultnsUtil(com.att.aro.core.bestpractice.pojo.SimultnsUtil) IBestPractice(com.att.aro.core.bestpractice.IBestPractice) MultipleConnectionsEntry(com.att.aro.core.bestpractice.pojo.MultipleConnectionsEntry) Map(java.util.Map) PacketAnalyzerResult(com.att.aro.core.packetanalysis.pojo.PacketAnalyzerResult) Collections(java.util.Collections) SortedMap(java.util.SortedMap) MultipleConnectionsEntry(com.att.aro.core.bestpractice.pojo.MultipleConnectionsEntry) MultiSimultnsConnectionResult(com.att.aro.core.bestpractice.pojo.MultiSimultnsConnectionResult) TreeMap(java.util.TreeMap) Map(java.util.Map) SortedMap(java.util.SortedMap)

Example 3 with MultipleConnectionsEntry

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);
        }
    }
}
Also used : MultipleConnectionsEntry(com.att.aro.core.bestpractice.pojo.MultipleConnectionsEntry) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) SessionValues(com.att.aro.core.packetanalysis.pojo.SessionValues) ArrayList(java.util.ArrayList) List(java.util.List) HashMap(java.util.HashMap) TreeMap(java.util.TreeMap) Map(java.util.Map) SortedMap(java.util.SortedMap) Session(com.att.aro.core.packetanalysis.pojo.Session)

Example 4 with MultipleConnectionsEntry

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");
    }
}
Also used : ImageMdataEntry(com.att.aro.core.bestpractice.pojo.ImageMdataEntry) TransmissionPrivateDataEntry(com.att.aro.core.bestpractice.pojo.TransmissionPrivateDataEntry) MultipleConnectionsEntry(com.att.aro.core.bestpractice.pojo.MultipleConnectionsEntry) HttpRequestResponseInfo(com.att.aro.core.packetanalysis.pojo.HttpRequestResponseInfo) DisplayNoneInCSSEntry(com.att.aro.core.bestpractice.pojo.DisplayNoneInCSSEntry) DiagnosticsTab(com.att.aro.ui.view.diagnostictab.DiagnosticsTab) CacheEntry(com.att.aro.core.packetanalysis.pojo.CacheEntry) UnnecessaryConnectionEntry(com.att.aro.core.bestpractice.pojo.UnnecessaryConnectionEntry) ForwardSecrecyEntry(com.att.aro.core.bestpractice.pojo.ForwardSecrecyEntry) HttpEntry(com.att.aro.core.bestpractice.pojo.HttpEntry) ImageCompressionEntry(com.att.aro.core.bestpractice.pojo.ImageCompressionEntry) UnsecureSSLVersionEntry(com.att.aro.core.bestpractice.pojo.UnsecureSSLVersionEntry) WaterfallTab(com.att.aro.ui.view.waterfalltab.WaterfallTab) SpriteImageEntry(com.att.aro.core.bestpractice.pojo.SpriteImageEntry) Session(com.att.aro.core.packetanalysis.pojo.Session) VideoStall(com.att.aro.core.packetanalysis.pojo.VideoStall)

Example 5 with MultipleConnectionsEntry

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;
}
Also used : SimultnsConnectionResult(com.att.aro.core.bestpractice.pojo.SimultnsConnectionResult) BPResultType(com.att.aro.core.bestpractice.pojo.BPResultType) SimultnsConnectionResult(com.att.aro.core.bestpractice.pojo.SimultnsConnectionResult) Session(com.att.aro.core.packetanalysis.pojo.Session) HashMap(java.util.HashMap) SessionValues(com.att.aro.core.packetanalysis.pojo.SessionValues) MessageFormat(java.text.MessageFormat) ArrayList(java.util.ArrayList) Value(org.springframework.beans.factory.annotation.Value) AbstractBestPracticeResult(com.att.aro.core.bestpractice.pojo.AbstractBestPracticeResult) List(java.util.List) TreeMap(java.util.TreeMap) SimultnsUtil(com.att.aro.core.bestpractice.pojo.SimultnsUtil) IBestPractice(com.att.aro.core.bestpractice.IBestPractice) MultipleConnectionsEntry(com.att.aro.core.bestpractice.pojo.MultipleConnectionsEntry) Map(java.util.Map) PacketAnalyzerResult(com.att.aro.core.packetanalysis.pojo.PacketAnalyzerResult) Collections(java.util.Collections) SortedMap(java.util.SortedMap) MultipleConnectionsEntry(com.att.aro.core.bestpractice.pojo.MultipleConnectionsEntry) HashMap(java.util.HashMap) TreeMap(java.util.TreeMap) Map(java.util.Map) SortedMap(java.util.SortedMap)

Aggregations

MultipleConnectionsEntry (com.att.aro.core.bestpractice.pojo.MultipleConnectionsEntry)5 Session (com.att.aro.core.packetanalysis.pojo.Session)5 SessionValues (com.att.aro.core.packetanalysis.pojo.SessionValues)4 ArrayList (java.util.ArrayList)4 Map (java.util.Map)4 SortedMap (java.util.SortedMap)4 TreeMap (java.util.TreeMap)4 List (java.util.List)3 IBestPractice (com.att.aro.core.bestpractice.IBestPractice)2 AbstractBestPracticeResult (com.att.aro.core.bestpractice.pojo.AbstractBestPracticeResult)2 BPResultType (com.att.aro.core.bestpractice.pojo.BPResultType)2 SimultnsUtil (com.att.aro.core.bestpractice.pojo.SimultnsUtil)2 PacketAnalyzerResult (com.att.aro.core.packetanalysis.pojo.PacketAnalyzerResult)2 MessageFormat (java.text.MessageFormat)2 Collections (java.util.Collections)2 HashMap (java.util.HashMap)2 Value (org.springframework.beans.factory.annotation.Value)2 DisplayNoneInCSSEntry (com.att.aro.core.bestpractice.pojo.DisplayNoneInCSSEntry)1 ForwardSecrecyEntry (com.att.aro.core.bestpractice.pojo.ForwardSecrecyEntry)1 HttpEntry (com.att.aro.core.bestpractice.pojo.HttpEntry)1