dispatcherResult.setExecutionMarksProcessed(getDispatcherResultSise());
}
protected FunctorBenchmarkStats calculateExecutionStatisticsInternal(FunctorExecutionMark.FunctorExecutionMarkTimeExtractor te)
{
Accamulator startTime = new Accamulator();
Accamulator returnTime = new Accamulator();
Accamulator sumbitLatency = new Accamulator();
Accamulator returnLatency = new Accamulator();
int n = 0;
for (Collection<FunctorExecutionMark> l : workersResult)
{
for(FunctorExecutionMark m : l)
{
n++;
startTime.add(te.getSendTime(m));
returnTime.add(te.getReturnTime(m));
sumbitLatency.add(te.getReceiveTime(m) - te.getSendTime(m));
returnLatency.add(te.getReturnTime(m) - te.getSendTime(m));
}
}
FunctorBenchmarkStats res = new FunctorBenchmarkStats();
res.totalTime = (returnTime.getMax() - startTime.getMin()) / TimeUnit.SECONDS.toMillis(1);
res.throughput = n / res.totalTime;
res.averageSumbitLatency = sumbitLatency.getMean();
res.averageReturnLatency = returnLatency.getMean();
res.sumbitLatencyVariance = sumbitLatency.getVariance();
res.returnLatencyVariance = returnLatency.getVariance();
res.maxSumbitLatency = sumbitLatency.getMax();
res.maxReturnLatency = returnLatency.getMax();
res.minSumbitLatency = sumbitLatency.getMin();
res.minReturnLatency = returnLatency.getMin();
return res;
}