Search in sources :

Example 6 with TraceDirectoryResult

use of com.att.aro.core.packetanalysis.pojo.TraceDirectoryResult in project VideoOptimzer by attdevsupport.

the class AttenuationProfilePanel method refresh.

/* (non-Javadoc)
	 * @see com.att.aro.ui.commonui.IUITabPanelLayoutUpdate#refresh(com.att.aro.core.pojo.AROTraceData)
	 */
@Override
public void refresh(AROTraceData analyzerResult) {
    TraceDirectoryResult traceResult = (TraceDirectoryResult) analyzerResult.getAnalyzerResult().getTraceresult();
    CollectOptions collectOptions = traceResult.getCollectOptions();
    refresh(collectOptions);
}
Also used : CollectOptions(com.att.aro.core.peripheral.pojo.CollectOptions) TraceDirectoryResult(com.att.aro.core.packetanalysis.pojo.TraceDirectoryResult)

Example 7 with TraceDirectoryResult

use of com.att.aro.core.packetanalysis.pojo.TraceDirectoryResult in project VideoOptimzer by attdevsupport.

the class DateTraceAppDetailPanel method refreshTraceDirectory.

private void refreshTraceDirectory(PacketAnalyzerResult traceResults) {
    TraceDirectoryResult traceDirectoryResults = (TraceDirectoryResult) traceResults.getTraceresult();
    tabPanelCommon.setText(LabelKeys.bestPractices_applicationversion, traceDirectoryResults.getCollectorVersion());
    tabPanelCommon.setText(LabelKeys.bestPractices_devicemodel, traceDirectoryResults.getDeviceMake() + " / " + traceDirectoryResults.getDeviceModel());
    tabPanelCommon.setText(LabelKeys.bestPractices_display_resolution, MessageFormat.format(ResourceBundleHelper.getMessageString("bestPractices.displayResolutionValue"), traceDirectoryResults.getCollectOptions().getOrientation(), String.valueOf(traceDirectoryResults.getDeviceScreenSizeX()), String.valueOf(traceDirectoryResults.getDeviceScreenSizeY())));
    tabPanelCommon.setText(LabelKeys.bestPractices_os_version, traceDirectoryResults.getOsVersion());
    tabPanelCommon.setText(LabelKeys.bestPractices_networktype, traceDirectoryResults.getNetworkTypesList());
    String timeRangeText;
    if (traceDirectoryResults.getTimeRange().getTitle() == null) {
        timeRangeText = String.format("%.3f - %.3f", traceResults.getTimeRangeAnalysis().getStartTime(), traceResults.getTimeRangeAnalysis().getEndTime());
    } else {
        timeRangeText = traceDirectoryResults.getTimeRange().getRange();
    }
    tabPanelCommon.setText(LabelKeys.bestPractices_range, timeRangeText);
}
Also used : TraceDirectoryResult(com.att.aro.core.packetanalysis.pojo.TraceDirectoryResult)

Example 8 with TraceDirectoryResult

use of com.att.aro.core.packetanalysis.pojo.TraceDirectoryResult in project VideoOptimzer by attdevsupport.

the class VideoTabProfilePanel method refresh.

public void refresh(AROTraceData aModel) {
    this.dateValueLabel.setText(aModel.getAnalyzerResult().getTraceresult().getTraceDateTime().toString());
    File directory = new File(aModel.getAnalyzerResult().getTraceresult().getTraceDirectory());
    this.traceValueLabel.setText(getTracePath(directory.getName()));
    this.traceDurationValueLabel.setText(Long.toString(aModel.getAnalyzerResult().getStatistic().getTotalByte()));
    if (TraceResultType.TRACE_DIRECTORY.equals(aModel.getAnalyzerResult().getTraceresult().getTraceResultType())) {
        TraceDirectoryResult tracedirectoryResult = (TraceDirectoryResult) aModel.getAnalyzerResult().getTraceresult();
        this.networkTypeValueLabel.setText(tracedirectoryResult.getNetworkTypesList());
        this.oSValueLabel.setText(tracedirectoryResult.getOsType() + " / " + tracedirectoryResult.getOsVersion());
        this.deviceValueLabel.setText(tracedirectoryResult.getDeviceMake() + " / " + tracedirectoryResult.getDeviceModel());
    } else {
        this.networkTypeValueLabel.setText("");
        this.oSValueLabel.setText("");
        this.deviceValueLabel.setText("");
    }
}
Also used : TraceDirectoryResult(com.att.aro.core.packetanalysis.pojo.TraceDirectoryResult) File(java.io.File)

Example 9 with TraceDirectoryResult

use of com.att.aro.core.packetanalysis.pojo.TraceDirectoryResult in project VideoOptimzer by attdevsupport.

the class ImageSizeImpl method runTest.

@Override
public AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata) {
    mImageFoundInHtmlOrCss = false;
    ImageSizeResult result = new ImageSizeResult();
    List<ImageSizeEntry> entrylist = new ArrayList<ImageSizeEntry>();
    // 480 * 1.1;
    int deviceScreenSizeX = 528;
    // 800 * 1.1;
    int deviceScreenSizeY = 880;
    // screen size is available when reading trace directory
    if (tracedata.getTraceresult().getTraceResultType() == TraceResultType.TRACE_DIRECTORY) {
        TraceDirectoryResult dirdata = (TraceDirectoryResult) tracedata.getTraceresult();
        deviceScreenSizeX = (dirdata.getDeviceScreenSizeX() * 110) / 100;
        deviceScreenSizeY = (dirdata.getDeviceScreenSizeY() * 110) / 100;
    }
    for (Session session : tracedata.getSessionlist()) {
        HttpRequestResponseInfo lastReq = null;
        for (HttpRequestResponseInfo req : session.getRequestResponseInfo()) {
            if (req.getDirection() == HttpDirection.REQUEST) {
                lastReq = req;
            }
            if (req.getDirection() == HttpDirection.RESPONSE && req.getContentType() != null && req.getContentType().contains("image/")) {
                boolean isBigSize = false;
                List<HtmlImage> htmlImageList = checkThisImageInAllHTMLOrCSS(session, req);
                if (mImageFoundInHtmlOrCss) {
                    mImageFoundInHtmlOrCss = false;
                    if (!htmlImageList.isEmpty()) {
                        for (int index = 0; index < htmlImageList.size(); index++) {
                            HtmlImage htmlImage = htmlImageList.get(index);
                            isBigSize = compareDownloadedImgSizeWithStdImageSize(req, htmlImage, deviceScreenSizeX, deviceScreenSizeY, session);
                            if (isBigSize) {
                                break;
                            }
                        }
                    } else {
                        isBigSize = compareDownloadedImgSizeWithStdImageSize(req, null, deviceScreenSizeX, deviceScreenSizeY, session);
                    }
                    if (isBigSize) {
                        entrylist.add(new ImageSizeEntry(req, lastReq, session.getDomainName()));
                    }
                }
            }
        }
    }
    result.setDeviceScreenSizeRangeX(deviceScreenSizeX);
    result.setDeviceScreenSizeRangeY(deviceScreenSizeY);
    result.setResults(entrylist);
    String text = "";
    if (entrylist.isEmpty()) {
        result.setResultType(BPResultType.PASS);
        text = MessageFormat.format(textResultPass, entrylist.size());
        result.setResultText(text);
        result.setResultExcelText(BPResultType.PASS.getDescription());
    } else {
        result.setResultType(BPResultType.FAIL);
        text = MessageFormat.format(textResults, ApplicationConfig.getInstance().getAppShortName(), entrylist.size());
        result.setResultText(text);
        result.setResultExcelText(MessageFormat.format(textExcelResults, BPResultType.FAIL.getDescription(), entrylist.size()));
    }
    result.setAboutText(aboutText);
    result.setDetailTitle(detailTitle);
    result.setLearnMoreUrl(learnMoreUrl);
    result.setOverviewTitle(overviewTitle);
    result.setExportNumberOfLargeImages(exportNumberOfLargeImages);
    return result;
}
Also used : HtmlImage(com.att.aro.core.bestpractice.pojo.HtmlImage) ImageSizeEntry(com.att.aro.core.bestpractice.pojo.ImageSizeEntry) HttpRequestResponseInfo(com.att.aro.core.packetanalysis.pojo.HttpRequestResponseInfo) ArrayList(java.util.ArrayList) TraceDirectoryResult(com.att.aro.core.packetanalysis.pojo.TraceDirectoryResult) ImageSizeResult(com.att.aro.core.bestpractice.pojo.ImageSizeResult) Session(com.att.aro.core.packetanalysis.pojo.Session)

Example 10 with TraceDirectoryResult

use of com.att.aro.core.packetanalysis.pojo.TraceDirectoryResult in project VideoOptimzer by attdevsupport.

the class VideoResolutionQualityImpl method presetResultsByDevice.

private BPResultType presetResultsByDevice(AbstractTraceResult traceResults) {
    noDPIflag = false;
    BPResultType resultType = BPResultType.NONE;
    if (traceResults != null && traceResults instanceof TraceDirectoryResult) {
        DeviceDetail deviceDetail = ((TraceDirectoryResult) traceResults).getDeviceDetail();
        String deviceModel = deviceDetail.getDeviceModel();
        String[] screenSize = deviceDetail.getScreenSize().split("\\*");
        if (screenSize != null && screenSize.length > 0) {
            double screenHeight = Double.valueOf(screenSize[0]);
            if (deviceDetail.getOsType().equals("android") && deviceDetail.getScreenDensity() == 0) {
                noDPIflag = true;
                conditionalMessage = " " + noDPI;
                resultType = BPResultType.SELF_TEST;
            }
            if (deviceModel.startsWith("iPad") || isTablet(screenHeight, deviceDetail.getScreenDensity())) {
                resultType = BPResultType.PASS;
            }
        }
    }
    return resultType;
}
Also used : BPResultType(com.att.aro.core.bestpractice.pojo.BPResultType) TraceDirectoryResult(com.att.aro.core.packetanalysis.pojo.TraceDirectoryResult) DeviceDetail(com.att.aro.core.peripheral.pojo.DeviceDetail)

Aggregations

TraceDirectoryResult (com.att.aro.core.packetanalysis.pojo.TraceDirectoryResult)51 ArrayList (java.util.ArrayList)16 BaseTest (com.att.aro.core.BaseTest)14 Test (org.junit.Test)14 TraceResultType (com.att.aro.core.packetanalysis.pojo.TraceResultType)13 XYToolTipGenerator (org.jfree.chart.labels.XYToolTipGenerator)10 XYItemRenderer (org.jfree.chart.renderer.xy.XYItemRenderer)10 XYDataset (org.jfree.data.xy.XYDataset)10 Session (com.att.aro.core.packetanalysis.pojo.Session)9 PacketAnalyzerResult (com.att.aro.core.packetanalysis.pojo.PacketAnalyzerResult)8 CollectOptions (com.att.aro.core.peripheral.pojo.CollectOptions)7 XYIntervalSeries (org.jfree.data.xy.XYIntervalSeries)7 XYSeries (org.jfree.data.xy.XYSeries)7 AbstractTraceResult (com.att.aro.core.packetanalysis.pojo.AbstractTraceResult)5 HttpRequestResponseInfo (com.att.aro.core.packetanalysis.pojo.HttpRequestResponseInfo)5 File (java.io.File)5 IHttpRequestResponseHelper (com.att.aro.core.packetanalysis.IHttpRequestResponseHelper)4 AnalysisFilter (com.att.aro.core.packetanalysis.pojo.AnalysisFilter)4 TimeRange (com.att.aro.core.packetanalysis.pojo.TimeRange)4 IOException (java.io.IOException)4