use of com.att.aro.ui.model.overview.TraceBenchmarkInfo in project VideoOptimzer by attdevsupport.
the class TraceBenchmarkChartPanel method generateDataForChart.
public TraceBenchmarkInfo generateDataForChart() {
TraceBenchmarkInfo traceBenchmarkPojo = new TraceBenchmarkInfo();
if (traceModel != null && traceModel.getAnalyzerResult() != null) {
double averageKbps = traceModel.getAnalyzerResult().getStatistic().getAverageKbps();
traceBenchmarkPojo.setThroughputPct(ApplicationSampling.getInstance().getThroughputPercentile(averageKbps));
double totalKbps = traceModel.getAnalyzerResult().getStatistic().getTotalByte() / 1024;
traceBenchmarkPojo.setKbps(totalKbps);
double promo = 0.0;
double joulesPerKbps = 0.0;
switch(traceModel.getAnalyzerResult().getStatemachine().getType()) {
case Type3G:
RrcStateMachine3G rrcState3G = (RrcStateMachine3G) traceModel.getAnalyzerResult().getStatemachine();
joulesPerKbps = rrcState3G.getJoulesPerKilobyte();
promo = rrcState3G.getPromotionRatio();
break;
case LTE:
RrcStateMachineLTE rrcStateLTE = (RrcStateMachineLTE) traceModel.getAnalyzerResult().getStatemachine();
joulesPerKbps = rrcStateLTE.getJoulesPerKilobyte();
promo = rrcStateLTE.getLteDrxLongRatio();
break;
case WiFi:
RrcStateMachineWiFi rrcStateWifi = (RrcStateMachineWiFi) traceModel.getAnalyzerResult().getStatemachine();
joulesPerKbps = rrcStateWifi.getJoulesPerKilobyte();
promo = (rrcStateWifi.getWifiIdleTime() + rrcStateWifi.getWifiActiveTime()) / rrcStateWifi.getPacketsDuration();
break;
default:
break;
}
traceBenchmarkPojo.setJpkb(joulesPerKbps);
traceBenchmarkPojo.setJpkbPct(ApplicationSampling.getInstance().getJpkbPercentile(joulesPerKbps));
traceBenchmarkPojo.setPromotionRatioPct(promo);
traceBenchmarkPojo.setPromoRatioPercentail(ApplicationSampling.getInstance().getPromoRatioPercentile(promo));
}
return traceBenchmarkPojo;
}
Aggregations