Search in sources :

Example 1 with TraceBenchmarkInfo

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;
}
Also used : RrcStateMachine3G(com.att.aro.core.packetanalysis.pojo.RrcStateMachine3G) RrcStateMachineLTE(com.att.aro.core.packetanalysis.pojo.RrcStateMachineLTE) TraceBenchmarkInfo(com.att.aro.ui.model.overview.TraceBenchmarkInfo) RrcStateMachineWiFi(com.att.aro.core.packetanalysis.pojo.RrcStateMachineWiFi)

Aggregations

RrcStateMachine3G (com.att.aro.core.packetanalysis.pojo.RrcStateMachine3G)1 RrcStateMachineLTE (com.att.aro.core.packetanalysis.pojo.RrcStateMachineLTE)1 RrcStateMachineWiFi (com.att.aro.core.packetanalysis.pojo.RrcStateMachineWiFi)1 TraceBenchmarkInfo (com.att.aro.ui.model.overview.TraceBenchmarkInfo)1