Examples of IDuccPerWorkItemStatistics


Examples of org.apache.uima.ducc.transport.event.common.IDuccPerWorkItemStatistics

            // we need at least 1 if the job isn't reported complete, in case the user forgot to set the
            // work item count.  the job will run, but slowly in that case.
            int remaining_work = Math.max(total_work - completed_work, 1);

            double arith_mean = Double.NaN;
            IDuccPerWorkItemStatistics stats = si.getPerWorkItemStatistics();       
            if(stats != null) {
              arith_mean = stats.getMean();
            }

            logger.info(methodName, job.getDuccId(),
                        String.format("tot: %d %s -> %s compl: %s err: %s rem: %d mean: %f",
                                      total_work, 
View Full Code Here

Examples of org.apache.uima.ducc.transport.event.common.IDuccPerWorkItemStatistics

    String methodName = "getProjection";
    String retVal = "";
    try {
      WorkItemStateHelper workItemStateHelper = new WorkItemStateHelper(job);
      IDuccSchedulingInfo schedulingInfo = job.getSchedulingInfo();
      IDuccPerWorkItemStatistics perWorkItemStatistics = schedulingInfo.getPerWorkItemStatistics();
      if (perWorkItemStatistics == null) {
        return "";
      }
      int total = schedulingInfo.getIntWorkItemsTotal();
      int completed = schedulingInfo.getIntWorkItemsCompleted();
      int error = schedulingInfo.getIntWorkItemsError();
      int remainingWorkItems = total - (completed + error);
      if(remainingWorkItems > 0) {
        int usableProcessCount = job.getProcessMap().getUsableProcessCount();
        if(usableProcessCount > 0) {
          if(completed > 0) {
            int threadsPerProcess = schedulingInfo.getIntThreadsPerShare();
            int totalThreads = usableProcessCount * threadsPerProcess;
            double remainingIterations = remainingWorkItems / totalThreads;
            double avgMillis = perWorkItemStatistics.getMean();
            double leastOperatingMillis = workItemStateHelper.getLeastOperatingMillis(job);
            double mostCompletedMillis = workItemStateHelper.getMostCompletedMillis(job);
            double projectedTime = (avgMillis * remainingIterations) + (mostCompletedMillis - leastOperatingMillis);
            duccLogger.trace(methodName, job.getDuccId(), "avgMillis:"+avgMillis+" "+"remainingIterations:"+remainingIterations+" "+"mostCompleteMillis:"+mostCompletedMillis+" "+"leastOperatingMillis:"+leastOperatingMillis);
            if(projectedTime > 0) {
View Full Code Here

Examples of org.apache.uima.ducc.transport.event.common.IDuccPerWorkItemStatistics

  }
   
  public double getAvgMillisPerWorkItem(HttpServletRequest request, IDuccWorkJob job) {
    double avgMillis = 0;
    IDuccSchedulingInfo schedulingInfo = job.getSchedulingInfo();
    IDuccPerWorkItemStatistics perWorkItemStatistics = schedulingInfo.getPerWorkItemStatistics();
    if (perWorkItemStatistics != null) {
      avgMillis = perWorkItemStatistics.getMean();
    }
    return avgMillis;
  }
View Full Code Here

Examples of org.apache.uima.ducc.transport.event.common.IDuccPerWorkItemStatistics

    sb.append("</span>");
    row.add(new JsonPrimitive(sb.toString()));
    // Done
    sb = new StringBuffer();
    sb.append("<span>");
    IDuccPerWorkItemStatistics perWorkItemStatistics = job.getSchedulingInfo().getPerWorkItemStatistics();
    String done = job.getSchedulingInfo().getWorkItemsCompleted();
    if (perWorkItemStatistics != null) {
      double max = Math.round(perWorkItemStatistics.getMax()/100.0)/10.0;
      double min = Math.round(perWorkItemStatistics.getMin()/100.0)/10.0;
      double avg = Math.round(perWorkItemStatistics.getMean()/100.0)/10.0;
      double dev = Math.round(perWorkItemStatistics.getStandardDeviation()/100.0)/10.0;
      done = "<span title=\""+"seconds-per-work-item "+"Max:"+max+" "+"Min:"+min+" "+"Avg:"+avg+" "+"Dev:"+dev+"\""+">"+done+"</span>";
    }
    sb.append(done);
    sb.append("</span>");
    row.add(new JsonPrimitive(sb.toString()));
View Full Code Here

Examples of org.apache.uima.ducc.transport.event.common.IDuccPerWorkItemStatistics

    sb.append("<td valign=\"bottom\" align=\"right\">");
    sb.append(job.getSchedulingInfo().getWorkItemsTotal());
    sb.append("</td>");
    // Done
    sb.append("<td valign=\"bottom\" align=\"right\">");
    IDuccPerWorkItemStatistics perWorkItemStatistics = job.getSchedulingInfo().getPerWorkItemStatistics();
    String done = job.getSchedulingInfo().getWorkItemsCompleted();
    if (perWorkItemStatistics != null) {
      double max = Math.round(perWorkItemStatistics.getMax()/100.0)/10.0;
      double min = Math.round(perWorkItemStatistics.getMin()/100.0)/10.0;
      double avg = Math.round(perWorkItemStatistics.getMean()/100.0)/10.0;
      double dev = Math.round(perWorkItemStatistics.getStandardDeviation()/100.0)/10.0;
      done = "<span title=\""+"seconds-per-work-item "+"Max:"+max+" "+"Min:"+min+" "+"Avg:"+avg+" "+"Dev:"+dev+"\""+">"+done+"</span>";
    }
    sb.append(done);
    sb.append("</td>");
    // Error
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.