Search in sources :

Example 1 with VideoStartup

use of com.att.aro.core.videoanalysis.pojo.VideoStartup in project VideoOptimzer by attdevsupport.

the class BpDetailItem method refresh.

@Override
public void refresh(AROTraceData model) {
    List<AbstractBestPracticeResult> bpResults = model.getBestPracticeResults();
    for (AbstractBestPracticeResult bpr : bpResults) {
        if (bpr.getBestPracticeType().equals(this.bpType)) {
            resultsTextLabel.setText(bpr.getResultText());
            imageLabel.setIcon(loadImageIcon(bpr));
            if (bpr.getResultType().equals(BPResultType.CONFIG_REQUIRED)) {
                addConfigIconActions();
            } else {
                imageLabel.setToolTipText("");
                if (imageLabel.getMouseListeners() != null && imageLabel.getMouseListeners().length > 1) {
                    imageLabel.setCursor(Cursor.getDefaultCursor());
                }
            }
            BestPracticeType resultType = bpr.getBestPracticeType();
            switch(resultType) {
                case FILE_COMPRESSION:
                    if (bpr.getResultType() == BPResultType.NONE)
                        ((BpFileCompressionTablePanel) resultsTablePanel).setData(Collections.emptyList());
                    else
                        ((BpFileCompressionTablePanel) resultsTablePanel).setData(((FileCompressionResult) bpr).getResults());
                    return;
                case DUPLICATE_CONTENT:
                    if (bpr.getResultType() == BPResultType.NONE)
                        ((BpFileDuplicateContentTablePanel) resultsTablePanel).setData(Collections.emptyList());
                    else
                        ((BpFileDuplicateContentTablePanel) resultsTablePanel).setData(((DuplicateContentResult) bpr).getDuplicateContentList());
                    return;
                case IMAGE_SIZE:
                    if (bpr.getResultType() == BPResultType.NONE || bpr.getResultType() == BPResultType.NO_DATA)
                        ((BpFileImageSizeTablePanel) resultsTablePanel).setData(Collections.emptyList());
                    else
                        ((BpFileImageSizeTablePanel) resultsTablePanel).setData(((ImageSizeResult) bpr).getResults());
                    return;
                case IMAGE_MDATA:
                    if (bpr.getResultType() == BPResultType.NONE || bpr.getResultType() == BPResultType.NO_DATA)
                        ((BpFileImageMDataTablePanel) imgMdataResultsTablePanel).setData(Collections.emptyList());
                    else
                        ((BpFileImageMDataTablePanel) imgMdataResultsTablePanel).setData(((ImageMdtaResult) bpr).getResults());
                    return;
                case IMAGE_CMPRS:
                    if (bpr.getResultType() == BPResultType.NONE || bpr.getResultType() == BPResultType.NO_DATA)
                        ((BpFileImageCompressionTablePanel) imageCompressionResultsTablePanel).setData(Collections.emptyList());
                    else
                        ((BpFileImageCompressionTablePanel) imageCompressionResultsTablePanel).setData(((ImageCompressionResult) bpr).getResults());
                    return;
                case IMAGE_FORMAT:
                    if (bpr.getResultType() == BPResultType.NONE || bpr.getResultType() == BPResultType.NO_DATA)
                        ((BpFileImageFormatTablePanel) imageFormatResultsTablePanel).setData(Collections.emptyList());
                    else
                        ((BpFileImageFormatTablePanel) imageFormatResultsTablePanel).setData(((ImageFormatResult) bpr).getResults());
                    return;
                case IMAGE_COMPARE:
                    if (bpr.getResultType() == BPResultType.NONE || bpr.getResultType() == BPResultType.NO_DATA) {
                        ((BpFileImageComparisionTablePanel) imageComparisonResultsTablePanel).setData(Collections.emptyList());
                    } else {
                        ((BpFileImageComparisionTablePanel) imageComparisonResultsTablePanel).setData(((ImageComparatorResult) bpr).getResults());
                    }
                    return;
                case MINIFICATION:
                    if (bpr.getResultType() == BPResultType.NONE)
                        ((BpFileMinificationTablePanel) resultsTablePanel).setData(Collections.emptyList());
                    else
                        ((BpFileMinificationTablePanel) resultsTablePanel).setData(((MinificationResult) bpr).getMinificationEntryList());
                    return;
                case SPRITEIMAGE:
                    if (bpr.getResultType() == BPResultType.NONE)
                        ((BpFileSpriteImagesTablePanel) resultsTablePanel).setData(Collections.emptyList());
                    else
                        ((BpFileSpriteImagesTablePanel) resultsTablePanel).setData(((SpriteImageResult) bpr).getAnalysisResults());
                    return;
                case HTTP_4XX_5XX:
                    if (bpr.getResultType() == BPResultType.NONE)
                        ((BpConnectionsHttp4xx5xxTablePanel) resultsTablePanel).setData(Collections.emptyList());
                    else
                        ((BpConnectionsHttp4xx5xxTablePanel) resultsTablePanel).setData(((Http4xx5xxResult) bpr).getHttpResCodelist());
                    return;
                case HTTP_3XX_CODE:
                    if (bpr.getResultType() == BPResultType.NONE)
                        ((BpConnectionsHttp3xxTablePanel) resultsTablePanel).setData(Collections.emptyList());
                    else
                        ((BpConnectionsHttp3xxTablePanel) resultsTablePanel).setData(((Http3xxCodeResult) bpr).getHttp3xxResCode());
                    return;
                case ASYNC_CHECK:
                    if (bpr.getResultType() == BPResultType.NONE)
                        ((BpHtmlAsyncLoadTablePanel) resultsTablePanel).setData(Collections.emptyList());
                    else {
                        List<AsyncCheckEntry> res = ((AsyncCheckInScriptResult) bpr).getResults();
                        ((BpHtmlAsyncLoadTablePanel) resultsTablePanel).setData(res);
                    }
                    return;
                case FILE_ORDER:
                    if (bpr.getResultType() == BPResultType.NONE)
                        ((BpHtmlFileOrderTablePanel) resultsTablePanel).setData(Collections.emptyList());
                    else
                        ((BpHtmlFileOrderTablePanel) resultsTablePanel).setData(((FileOrderResult) bpr).getResults());
                    return;
                case DISPLAY_NONE_IN_CSS:
                    if (bpr.getResultType() == BPResultType.NONE)
                        ((BpHtmlDisplayNoneInCSSTablePanel) resultsTablePanel).setData(Collections.emptyList());
                    else
                        ((BpHtmlDisplayNoneInCSSTablePanel) resultsTablePanel).setData(((DisplayNoneInCSSResult) bpr).getResults());
                    return;
                case UNNECESSARY_CONNECTIONS:
                    if (bpr.getResultType() == BPResultType.NONE)
                        ((BpConnectionsUnnecessaryTablePanel) resultsTablePanel).setData(Collections.emptyList());
                    else
                        ((BpConnectionsUnnecessaryTablePanel) resultsTablePanel).setData(((UnnecessaryConnectionResult) bpr).getTightlyCoupledBurstsDetails());
                    return;
                case HTTPS_USAGE:
                    if (bpr.getResultType() == BPResultType.NONE)
                        ((BpSecurityHttpsUsageTablePanel) resultsTablePanel).setData(Collections.emptyList());
                    else
                        ((BpSecurityHttpsUsageTablePanel) resultsTablePanel).setData(((HttpsUsageResult) bpr).getResults());
                    return;
                case TRANSMISSION_PRIVATE_DATA:
                    if (bpr.getResultType() == BPResultType.NONE) {
                        ((BpSecurityTransmissionPrivateDataTablePanel) resultsTablePanel).setData(Collections.emptyList());
                        buttonPrivateData.setEnabled(false);
                    } else {
                        ((BpSecurityTransmissionPrivateDataTablePanel) resultsTablePanel).setData(((TransmissionPrivateDataResult) bpr).getResults());
                        buttonPrivateData.setEnabled(true);
                    }
                    return;
                case UNSECURE_SSL_VERSION:
                    if (bpr.getResultType() == BPResultType.NONE)
                        ((BpSecurityUnsecureSSLVersionTablePanel) resultsTablePanel).setData(Collections.emptyList());
                    else
                        ((BpSecurityUnsecureSSLVersionTablePanel) resultsTablePanel).setData(((UnsecureSSLVersionResult) bpr).getResults());
                    return;
                case FORWARD_SECRECY:
                    if (bpr.getResultType() == BPResultType.NONE)
                        ((BpSecurityForwardSecrecyTablePanel) resultsTablePanel).setData(Collections.emptyList());
                    else
                        ((BpSecurityForwardSecrecyTablePanel) resultsTablePanel).setData(((ForwardSecrecyResult) bpr).getResults());
                    return;
                case SIMUL_CONN:
                    if (bpr.getResultType() == BPResultType.NONE)
                        ((BPConnectionsSimultnsTablePanel) resultsTablePanel).setData(Collections.emptyList());
                    else
                        ((BPConnectionsSimultnsTablePanel) resultsTablePanel).setData(((SimultnsConnectionResult) bpr).getResults());
                    return;
                case MULTI_SIMULCONN:
                    if (bpr.getResultType() == BPResultType.NONE)
                        ((BPConnectionsSimultnsTablePanel) resultsTablePanel).setData(Collections.emptyList());
                    else
                        ((BPConnectionsSimultnsTablePanel) resultsTablePanel).setData(((MultiSimultnsConnectionResult) bpr).getResults());
                    return;
                case VIDEO_STALL:
                    if (bpr.getResultType() == BPResultType.NONE || bpr.getResultType() == BPResultType.NO_DATA) {
                        ((BPVideoStallTablePanel) resultsTablePanel).setData(Collections.emptyList());
                    } else {
                        ((BPVideoStallTablePanel) resultsTablePanel).setData(((VideoStallResult) bpr).getResults());
                    }
                    return;
                case STARTUP_DELAY:
                    StartupDelayComparisonPanel startupDelayPanel = (StartupDelayComparisonPanel) resultsChartPanel;
                    List<VideoStartup> results = Collections.emptyList();
                    if (bpr.getResultType() != BPResultType.NONE) {
                        results = ((VideoStartUpDelayResult) bpr).getResults();
                    }
                    startupDelayPanel.setData(results);
                    return;
                case VIDEO_ABR_LADDER:
                    VideoAdaptiveBitrateLadderPanel adaptiveBitrateLadderPanel = (VideoAdaptiveBitrateLadderPanel) resultsChartPanel;
                    if (bpr.getResultType() == BPResultType.NONE || bpr.getResultType() == BPResultType.NO_DATA) {
                        adaptiveBitrateLadderPanel.setData(Collections.emptyList());
                        ((BPAdaptiveBitrateTablePanel) resultsTablePanel).setData(Collections.emptyList());
                    } else {
                        adaptiveBitrateLadderPanel.setData(((VideoAdaptiveBitrateLadderResult) bpr).getResults());
                        ((BPAdaptiveBitrateTablePanel) resultsTablePanel).setData(((VideoAdaptiveBitrateLadderResult) bpr).getResults());
                    }
                    return;
                case VIDEO_CONCURRENT_SESSION:
                    if (bpr.getResultType() == BPResultType.NONE || bpr.getResultType() == BPResultType.NO_DATA) {
                        ((BPVideoConcurrentSessionTablePanel) resultsTablePanel).setData(Collections.emptyList());
                    } else {
                        ((BPVideoConcurrentSessionTablePanel) resultsTablePanel).setData(((VideoConcurrentSessionResult) bpr).getResults());
                    }
                    return;
                case NETWORK_COMPARISON:
                    if (bpr.getResultType() == BPResultType.NONE || bpr.getResultType() == BPResultType.NO_DATA) {
                        ((BPNetworkComparisonTablePanel) resultsTablePanel).setData(Collections.emptyList());
                    } else {
                        ((BPNetworkComparisonTablePanel) resultsTablePanel).setData(((VideoNetworkComparisonResult) bpr).getResults());
                    }
                    return;
                default:
                    return;
            }
        }
    }
}
Also used : AsyncCheckEntry(com.att.aro.core.bestpractice.pojo.AsyncCheckEntry) UnsecureSSLVersionResult(com.att.aro.core.bestpractice.pojo.UnsecureSSLVersionResult) ImageFormatResult(com.att.aro.core.bestpractice.pojo.ImageFormatResult) AbstractBestPracticeResult(com.att.aro.core.bestpractice.pojo.AbstractBestPracticeResult) BestPracticeType(com.att.aro.core.bestpractice.pojo.BestPracticeType) ImageSizeResult(com.att.aro.core.bestpractice.pojo.ImageSizeResult) DisplayNoneInCSSResult(com.att.aro.core.bestpractice.pojo.DisplayNoneInCSSResult) UnnecessaryConnectionResult(com.att.aro.core.bestpractice.pojo.UnnecessaryConnectionResult) MultiSimultnsConnectionResult(com.att.aro.core.bestpractice.pojo.MultiSimultnsConnectionResult) SimultnsConnectionResult(com.att.aro.core.bestpractice.pojo.SimultnsConnectionResult) VideoStartup(com.att.aro.core.videoanalysis.pojo.VideoStartup) Http3xxCodeResult(com.att.aro.core.bestpractice.pojo.Http3xxCodeResult) HttpsUsageResult(com.att.aro.core.bestpractice.pojo.HttpsUsageResult) MinificationResult(com.att.aro.core.bestpractice.pojo.MinificationResult) SpriteImageResult(com.att.aro.core.bestpractice.pojo.SpriteImageResult) ForwardSecrecyResult(com.att.aro.core.bestpractice.pojo.ForwardSecrecyResult) FileOrderResult(com.att.aro.core.bestpractice.pojo.FileOrderResult) AsyncCheckInScriptResult(com.att.aro.core.bestpractice.pojo.AsyncCheckInScriptResult) FileCompressionResult(com.att.aro.core.bestpractice.pojo.FileCompressionResult) DuplicateContentResult(com.att.aro.core.bestpractice.pojo.DuplicateContentResult) Http4xx5xxResult(com.att.aro.core.bestpractice.pojo.Http4xx5xxResult) MultiSimultnsConnectionResult(com.att.aro.core.bestpractice.pojo.MultiSimultnsConnectionResult) ImageCompressionResult(com.att.aro.core.bestpractice.pojo.ImageCompressionResult) ImageMdtaResult(com.att.aro.core.bestpractice.pojo.ImageMdtaResult)

Example 2 with VideoStartup

use of com.att.aro.core.videoanalysis.pojo.VideoStartup in project VideoOptimzer by attdevsupport.

the class StartupDelayComparisonPanel method refresh.

@Override
public void refresh(AROTraceData aModel) {
    ArrayList<VideoStartup> compApps = new ArrayList<>();
    compApps.add(new VideoStartup("RefApp 1", 0.914, 3.423));
    compApps.add(new VideoStartup("RefApp 2", 3.270, 8.400));
    compApps.add(new VideoStartup("RefApp 3", 2.409, 3.969));
    compApps.add(new VideoStartup("Tested ", .6, 7.7));
    ((VideoStartUpTableModel) graphicModel).setData(compApps);
    loadDataSet();
}
Also used : VideoStartup(com.att.aro.core.videoanalysis.pojo.VideoStartup) ArrayList(java.util.ArrayList)

Example 3 with VideoStartup

use of com.att.aro.core.videoanalysis.pojo.VideoStartup in project VideoOptimzer by attdevsupport.

the class VideoStartUpDelayImpl method runTest.

@Override
public AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata) {
    BPResultType bpResultType = BPResultType.SELF_TEST;
    result = new VideoStartUpDelayResult();
    init(result);
    warningValue = videoPref.getVideoUsagePreference().getStartUpDelayWarnVal();
    if ((streamingVideoData = tracedata.getStreamingVideoData()) != null && (videoStreamCollection = streamingVideoData.getVideoStreamMap()) != null && MapUtils.isNotEmpty(videoStreamCollection)) {
        selectedManifestCount = streamingVideoData.getSelectedManifestCount();
        hasSelectedManifest = (selectedManifestCount > 0);
        invalidCount = streamingVideoData.getInvalidManifestCount();
        // default startup delay
        startupDelay = videoPref.getVideoUsagePreference().getStartupDelay();
        startupDelaySet = false;
        bpResultType = BPResultType.CONFIG_REQUIRED;
        result.setResultExcelText(BPResultType.CONFIG_REQUIRED.getDescription());
        if (selectedManifestCount == 0) {
            if (invalidCount == videoStreamCollection.size()) {
                result.setResultText(invalidManifestsFound);
            } else if (invalidCount > 0) {
                result.setResultText(noManifestsSelectedMixed);
            } else {
                if (videoStreamCollection.size() > 0 && MapUtils.isEmpty(streamingVideoData.getStreamingVideoCompiled().getChunkPlayTimeList())) {
                    result.setResultText(startUpDelayNotSet);
                } else {
                    result.setResultText(noManifestsSelected);
                }
            }
        } else if (MapUtils.isEmpty(streamingVideoData.getStreamingVideoCompiled().getChunkPlayTimeList())) {
            result.setResultText(startUpDelayNotSet);
        } else if (selectedManifestCount > 1) {
            result.setResultText(multipleManifestsSelected);
        } else if (hasSelectedManifest) {
            startupDelaySet = true;
            for (VideoStream videoStream : videoStreamCollection.values()) {
                if (videoStream.isSelected() && MapUtils.isNotEmpty(videoStream.getVideoEventMap()) && videoStream.getManifest().getStartupVideoEvent() != null) {
                    Manifest manifest = videoStream.getManifest();
                    manifestRequestTime = manifest.getRequestTime();
                    // - tracedata.getTraceresult().getPcapTimeOffset();
                    manifestDeliveredTime = manifest.getEndTime() - manifestRequestTime;
                    startupDelay = manifest.getStartupDelay() - manifestRequestTime;
                    playDelay = manifest.getStartupDelay() - manifestRequestTime;
                    LOG.info(String.format("startup segment = %s", manifest.getStartupVideoEvent()));
                    LOG.info(String.format("segment startupDelay = %.03f", startupDelay));
                    LOG.info(String.format("videoStream request to segment_plays = %.03f", manifest.getStartupVideoEvent().getPlayTime() - manifestRequestTime));
                    LOG.info(String.format("segment_plays = %.03f", manifest.getStartupVideoEvent().getPlayTime()));
                    List<VideoStartup> compApps = new ArrayList<>();
                    compApps.add(new VideoStartup("RefApp 1", 0.914, 3.423));
                    compApps.add(new VideoStartup("RefApp 2", 3.27, 8.400));
                    compApps.add(new VideoStartup("RefApp 3", 2.409, 3.969));
                    VideoStartup testedApp = new VideoStartup("Tested", manifestDeliveredTime, playDelay);
                    compApps.add(testedApp);
                    result.setResults(compApps);
                    bpResultType = Util.checkPassFailorWarning(startupDelay, warningValue);
                    if (bpResultType.equals(BPResultType.PASS)) {
                        result.setResultText(MessageFormat.format(textResultPass, startupDelay, startupDelay == 1 ? "" : "s"));
                        result.setResultExcelText(BPResultType.PASS.getDescription());
                    } else {
                        result.setResultText(MessageFormat.format(textResults, String.format("%.03f", startupDelay), startupDelay == 1 ? "" : "s", String.format("%.04f", warningValue), warningValue == 1 ? "" : "s"));
                        result.setResultExcelText(MessageFormat.format(textExcelResults, bpResultType.getDescription(), String.format("%.03f", startupDelay)));
                    }
                    break;
                }
            }
        } else {
            bpResultType = BPResultType.CONFIG_REQUIRED;
            result.setResultText(novalidManifestsFound);
            result.setResultExcelText(BPResultType.CONFIG_REQUIRED.getDescription());
        }
        result.setStartUpDelay(startupDelay);
    } else {
        // No Data
        result.setResultText(noData);
        bpResultType = BPResultType.NO_DATA;
        result.setResultExcelText(BPResultType.NO_DATA.getDescription());
    }
    result.setResultType(bpResultType);
    return result;
}
Also used : VideoStartup(com.att.aro.core.videoanalysis.pojo.VideoStartup) BPResultType(com.att.aro.core.bestpractice.pojo.BPResultType) VideoStream(com.att.aro.core.videoanalysis.pojo.VideoStream) ArrayList(java.util.ArrayList) List(java.util.List) Manifest(com.att.aro.core.videoanalysis.pojo.Manifest) VideoStartUpDelayResult(com.att.aro.core.bestpractice.pojo.VideoStartUpDelayResult)

Example 4 with VideoStartup

use of com.att.aro.core.videoanalysis.pojo.VideoStartup in project VideoOptimzer by attdevsupport.

the class StartupDelayComparisonPanel method loadDataSet.

public void loadDataSet() {
    timeLine = DEFAULT_TIMELINE;
    List<StartupEvent> testData = new ArrayList<>();
    for (VideoStartup videoStartup : graphicModel.getData()) {
        double pt1 = videoStartup.getManifestArrived();
        double pt3 = videoStartup.getPrepareToPlay() - pt1;
        if (timeLine < videoStartup.getPrepareToPlay()) {
            timeLine = (double) Math.round(videoStartup.getPrepareToPlay());
            if (videoStartup.getPrepareToPlay() % 1 <= .5) {
                timeLine += .5;
            }
        }
        testData.add(new StartupEvent(videoStartup.getAppName(), pt1, LifeCycleType.LOAD_MANIFEST));
        testData.add(new StartupEvent(videoStartup.getAppName(), pt3, LifeCycleType.PRELOADING));
        timeAxis.setRange(new Range(0, timeLine));
    }
    DefaultCategoryDataset dataset = new DefaultCategoryDataset();
    for (StartupEvent startupEvent : testData) {
        dataset.addValue(startupEvent.getTime(), ResourceBundleHelper.getMessageString("startup_delay_comparison." + startupEvent.getStatus().toString()), startupEvent.getName());
    }
    // Add the dataset to the plot
    CategoryPlot plot = getChartPanel().getChart().getCategoryPlot();
    plot.setDataset(dataset);
}
Also used : VideoStartup(com.att.aro.core.videoanalysis.pojo.VideoStartup) ArrayList(java.util.ArrayList) Range(org.jfree.data.Range) DefaultCategoryDataset(org.jfree.data.category.DefaultCategoryDataset) CategoryPlot(org.jfree.chart.plot.CategoryPlot)

Aggregations

VideoStartup (com.att.aro.core.videoanalysis.pojo.VideoStartup)4 ArrayList (java.util.ArrayList)3 AbstractBestPracticeResult (com.att.aro.core.bestpractice.pojo.AbstractBestPracticeResult)1 AsyncCheckEntry (com.att.aro.core.bestpractice.pojo.AsyncCheckEntry)1 AsyncCheckInScriptResult (com.att.aro.core.bestpractice.pojo.AsyncCheckInScriptResult)1 BPResultType (com.att.aro.core.bestpractice.pojo.BPResultType)1 BestPracticeType (com.att.aro.core.bestpractice.pojo.BestPracticeType)1 DisplayNoneInCSSResult (com.att.aro.core.bestpractice.pojo.DisplayNoneInCSSResult)1 DuplicateContentResult (com.att.aro.core.bestpractice.pojo.DuplicateContentResult)1 FileCompressionResult (com.att.aro.core.bestpractice.pojo.FileCompressionResult)1 FileOrderResult (com.att.aro.core.bestpractice.pojo.FileOrderResult)1 ForwardSecrecyResult (com.att.aro.core.bestpractice.pojo.ForwardSecrecyResult)1 Http3xxCodeResult (com.att.aro.core.bestpractice.pojo.Http3xxCodeResult)1 Http4xx5xxResult (com.att.aro.core.bestpractice.pojo.Http4xx5xxResult)1 HttpsUsageResult (com.att.aro.core.bestpractice.pojo.HttpsUsageResult)1 ImageCompressionResult (com.att.aro.core.bestpractice.pojo.ImageCompressionResult)1 ImageFormatResult (com.att.aro.core.bestpractice.pojo.ImageFormatResult)1 ImageMdtaResult (com.att.aro.core.bestpractice.pojo.ImageMdtaResult)1 ImageSizeResult (com.att.aro.core.bestpractice.pojo.ImageSizeResult)1 MinificationResult (com.att.aro.core.bestpractice.pojo.MinificationResult)1