use of com.att.aro.core.packetanalysis.pojo.Session in project VideoOptimzer by attdevsupport.
the class DLPacketPlot method populate.
// private static final Logger logger = LogManager.getLogger(DLPacketPlot.class.getName());
@Override
public void populate(XYPlot plot, AROTraceData analysis) {
LinkedHashMap<Color, PacketSeries> dlDatasets = new LinkedHashMap<Color, PacketSeries>();
AnalysisFilter filter = null;
// logger.info("isDownloadPacket(): "+ isDownloadPacket());
if (analysis != null) {
filter = analysis.getAnalyzerResult().getFilter();
for (Session session : analysis.getAnalyzerResult().getSessionlist()) {
addSeries(session, dlDatasets, filter);
}
}
// Create the XY data set
YIntervalSeriesCollection coll = new YIntervalSeriesCollection();
XYItemRenderer renderer = plot.getRenderer();
for (PacketSeries series : dlDatasets.values()) {
coll.addSeries(series);
renderer.setSeriesPaint(coll.indexOf(series.getKey()), series.getColor());
}
// Create tooltip generator
renderer.setBaseToolTipGenerator(new PacketToolTipGenerator());
plot.setDataset(coll);
// return plot;
}
use of com.att.aro.core.packetanalysis.pojo.Session in project VideoOptimzer by attdevsupport.
the class ConnectionsPlot method populate.
public void populate(XYPlot plot, AROTraceData analysis) {
series = new XYSeries(0);
if (analysis != null) {
List<Session> sessionList = analysis.getAnalyzerResult().getSessionlist();
if (sessionList != null && sessionList.size() > 0) {
calculateSimultConnections(sessionList);
} else {
return;
}
}
plot.setDataset(new XYSeriesCollection(series));
plot.getRenderer().setBaseToolTipGenerator(new XYToolTipGenerator() {
@Override
public String generateToolTip(XYDataset dataset, int series, int item) {
// Tooltip displays no of connections
return item < toolTipList.size() ? toolTipList.get(item) : "";
}
});
}
use of com.att.aro.core.packetanalysis.pojo.Session in project VideoOptimzer by attdevsupport.
the class ConnectionStatisticsChartPanel method generateDataForChart.
private ConnectionStatisticsInfo generateDataForChart() {
ConnectionStatisticsInfo connectionStatisticsPojo = new ConnectionStatisticsInfo();
double sessionTermPct = 0.0;
int longBurstCount = 0;
if (traceDataModel != null && traceDataModel.getAnalyzerResult() != null) {
int termSessions = 0;
int properTermSessions = 0;
for (Session tcpSession : traceDataModel.getAnalyzerResult().getSessionlist()) {
if (!tcpSession.isUdpOnly()) {
Termination termination = tcpSession.getSessionTermination();
if (termination != null) {
++termSessions;
if (termination.getSessionTerminationDelay() <= SESSION_TERMINATION_THRESHOLD) {
++properTermSessions;
}
}
}
}
if (termSessions > 0) {
sessionTermPct = 100.0 * properTermSessions / termSessions;
}
longBurstCount = traceDataModel.getAnalyzerResult().getBurstCollectionAnalysisData().getLongBurstCount();
}
connectionStatisticsPojo.setSessionTermPct(sessionTermPct);
double tightlyCoupledTCPPct = 0.0;
if (traceDataModel != null && traceDataModel.getAnalyzerResult() != null) {
int burstSize = traceDataModel.getAnalyzerResult().getBurstCollectionAnalysisData().getBurstCollection().size();
int periodicBurstCount = 0;
for (Burst burstInfo : traceDataModel.getAnalyzerResult().getBurstCollectionAnalysisData().getBurstCollection()) {
BurstCategory bCategory = burstInfo.getBurstCategory();
if (bCategory == BurstCategory.PERIODICAL) {
periodicBurstCount += 1;
}
}
double nonPeriodicBurstPct = 100 - 100.0 * periodicBurstCount / burstSize;
connectionStatisticsPojo.setNonPeriodicBurstPct(nonPeriodicBurstPct);
int tightlyCoupledBurstCount = 0;
for (AbstractBestPracticeResult abstractResult : traceDataModel.getBestPracticeResults()) {
if (abstractResult.getBestPracticeType().equals(BestPracticeType.UNNECESSARY_CONNECTIONS) && abstractResult.getResultType() != BPResultType.NONE) {
UnnecessaryConnectionResult unnecessaryConnt = (UnnecessaryConnectionResult) abstractResult;
tightlyCoupledBurstCount = unnecessaryConnt.getTightlyCoupledBurstCount();
}
}
tightlyCoupledTCPPct = 100.0 * tightlyCoupledBurstCount / burstSize;
connectionStatisticsPojo.setTightlyCoupledTCPPct(tightlyCoupledTCPPct);
double longBurstPct = 0.0;
longBurstPct = 100.0 * longBurstCount / burstSize;
connectionStatisticsPojo.setLongBurstPct(longBurstPct);
}
return connectionStatisticsPojo;
}
use of com.att.aro.core.packetanalysis.pojo.Session in project VideoOptimzer by attdevsupport.
the class FileTypesChartPanel method generateDataForChart.
/**
* Creates the FilTypes list to be plotted on the chart.
* @return
*/
private void generateDataForChart() {
Map<String, FileTypeSummary> content = new HashMap<String, FileTypeSummary>();
int totalContentLength = 0;
if (traceDataModel != null && traceDataModel.getAnalyzerResult() != null) {
for (Session tcp : traceDataModel.getAnalyzerResult().getSessionlist()) {
if (!tcp.isUdpOnly()) {
for (HttpRequestResponseInfo info : tcp.getRequestResponseInfo()) {
if (HttpDirection.RESPONSE.equals(info.getDirection())) {
long contentLength = info.getContentLength();
if (contentLength > 0) {
String contentType = info.getContentType();
if (contentType == null || contentType.isEmpty()) {
contentType = ResourceBundleHelper.getMessageString("chart.filetype.unknown");
}
FileTypeSummary summary = content.get(contentType);
if (summary == null) {
summary = new FileTypeSummary(contentType);
content.put(contentType, summary);
}
// summary.bytes += contentLength;
summary.setBytes(summary.getBytes() + contentLength);
totalContentLength += contentLength;
}
}
}
}
}
}
List<FileTypeSummary> result = new ArrayList<FileTypeSummary>(content.values());
Collections.sort(result);
if (result.size() > MAX_LIMIT_FILETYPES) {
long otherValuesTotal = 0;
Iterator<FileTypeSummary> iterator = result.iterator();
for (int index = 0; index < (MAX_LIMIT_FILETYPES - 1); index++) {
iterator.next();
}
while (iterator.hasNext()) {
otherValuesTotal += iterator.next().getBytes();
iterator.remove();
}
FileTypeSummary other = new FileTypeSummary(ResourceBundleHelper.getMessageString("chart.filetype.others"));
other.setBytes(otherValuesTotal);
result.add(other);
// Sort again
Collections.sort(result);
}
for (FileTypeSummary summary : result) {
summary.setPct((double) summary.getBytes() / totalContentLength * 100.0);
}
this.setFileTypeContent(result);
}
use of com.att.aro.core.packetanalysis.pojo.Session in project VideoOptimzer by attdevsupport.
the class OverviewTabTableSplitPane method loadAccessedDomainsTable.
private void loadAccessedDomainsTable() {
List<Session> tcpSessions = new ArrayList<Session>();
for (Session tcpSession : this.getAroModel().getAnalyzerResult().getSessionlist()) {
if (!tcpSession.isUdpOnly()) {
tcpSessions.add(tcpSession);
}
}
accessDomainModel.setData(DomainsTCPSessions.extractDomainTcpSessions(tcpSessions));
}
Aggregations