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);
}
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);
}
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("");
}
}
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;
}
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;
}
Aggregations