Examples of TaskStats


Examples of com.facebook.presto.operator.TaskStats

                }
                else {
                    runningTasks++;
                }

                TaskStats taskStats = taskInfo.getStats();

                totalDrivers += taskStats.getTotalDrivers();
                queuedDrivers += taskStats.getQueuedDrivers();
                runningDrivers += taskStats.getRunningDrivers();
                completedDrivers += taskStats.getCompletedDrivers();

                totalMemoryReservation += taskStats.getMemoryReservation().toBytes();

                totalScheduledTime += taskStats.getTotalScheduledTime().roundTo(NANOSECONDS);
                totalCpuTime += taskStats.getTotalCpuTime().roundTo(NANOSECONDS);
                totalUserTime += taskStats.getTotalUserTime().roundTo(NANOSECONDS);
                totalBlockedTime += taskStats.getTotalBlockedTime().roundTo(NANOSECONDS);

                rawInputDataSize += taskStats.getRawInputDataSize().toBytes();
                rawInputPositions += taskStats.getRawInputPositions();

                processedInputDataSize += taskStats.getProcessedInputDataSize().toBytes();
                processedInputPositions += taskStats.getProcessedInputPositions();

                outputDataSize += taskStats.getOutputDataSize().toBytes();
                outputPositions += taskStats.getOutputPositions();
            }

            StageStats stageStats = new StageStats(
                    schedulingComplete.get(),
                    getSplitDistribution.snapshot(),
View Full Code Here

Examples of com.facebook.presto.operator.TaskStats

                }
                else {
                    runningTasks++;
                }

                TaskStats taskStats = taskInfo.getStats();

                totalDrivers += taskStats.getTotalDrivers();
                queuedDrivers += taskStats.getQueuedDrivers();
                runningDrivers += taskStats.getRunningDrivers();
                completedDrivers += taskStats.getCompletedDrivers();

                totalMemoryReservation += taskStats.getMemoryReservation().toBytes();

                totalScheduledTime += taskStats.getTotalScheduledTime().roundTo(NANOSECONDS);
                totalCpuTime += taskStats.getTotalCpuTime().roundTo(NANOSECONDS);
                totalUserTime += taskStats.getTotalUserTime().roundTo(NANOSECONDS);
                totalBlockedTime += taskStats.getTotalBlockedTime().roundTo(NANOSECONDS);

                rawInputDataSize += taskStats.getRawInputDataSize().toBytes();
                rawInputPositions += taskStats.getRawInputPositions();

                processedInputDataSize += taskStats.getProcessedInputDataSize().toBytes();
                processedInputPositions += taskStats.getProcessedInputPositions();

                outputDataSize += taskStats.getOutputDataSize().toBytes();
                outputPositions += taskStats.getOutputPositions();
            }

            StageStats stageStats = new StageStats(
                    schedulingComplete.get(),
                    getSplitDistribution.snapshot(),
View Full Code Here

Examples of com.facebook.presto.operator.TaskStats

                {
                    return new BufferInfo(outputId, false, 0, 0);
                }
            }));

            TaskStats taskStats = new TaskContext(taskId, executor, session).getTaskStats();

            taskInfo = new StateMachine<>("task " + taskId, executor, new TaskInfo(
                    taskId,
                    TaskInfo.MIN_VERSION,
                    TaskState.PLANNED,
View Full Code Here

Examples of com.facebook.presto.operator.TaskStats

                {
                    return new BufferInfo(outputId, false, 0, 0);
                }
            }));

            TaskStats taskStats = new TaskContext(taskId, executor, session).getTaskStats();

            taskInfo = new StateMachine<>("task " + taskId, executor, new TaskInfo(
                    taskId,
                    TaskInfo.MIN_VERSION,
                    TaskState.PLANNED,
View Full Code Here

Examples of com.facebook.presto.operator.TaskStats

        CpuTimer cpuTimer = new CpuTimer();
        execute(taskContext);
        CpuDuration executionTime = cpuTimer.elapsedTime();

        TaskStats taskStats = taskContext.getTaskStats();
        long inputRows = taskStats.getRawInputPositions();
        long inputBytes = taskStats.getRawInputDataSize().toBytes();
        long outputRows = taskStats.getOutputPositions();
        long outputBytes = taskStats.getOutputDataSize().toBytes();

        double inputMegaBytes = new DataSize(inputBytes, BYTE).getValue(MEGABYTE);

        return ImmutableMap.<String, Long>builder()
                // legacy computed values
View Full Code Here

Examples of com.facebook.presto.operator.TaskStats

                {
                    return new BufferInfo(outputId, false, 0, 0);
                }
            }));

            TaskStats taskStats = new TaskContext(taskId, executor, session).getTaskStats();

            taskInfo = new StateMachine<>("task " + taskId, executor, new TaskInfo(
                    taskId,
                    TaskInfo.MIN_VERSION,
                    TaskState.PLANNED,
View Full Code Here

Examples of com.facebook.presto.operator.TaskStats

                }
                else {
                    runningTasks++;
                }

                TaskStats taskStats = taskInfo.getStats();

                totalDrivers += taskStats.getTotalDrivers();
                queuedDrivers += taskStats.getQueuedDrivers();
                runningDrivers += taskStats.getRunningDrivers();
                completedDrivers += taskStats.getCompletedDrivers();

                totalMemoryReservation += taskStats.getMemoryReservation().toBytes();

                totalScheduledTime += taskStats.getTotalScheduledTime().roundTo(NANOSECONDS);
                totalCpuTime += taskStats.getTotalCpuTime().roundTo(NANOSECONDS);
                totalUserTime += taskStats.getTotalUserTime().roundTo(NANOSECONDS);
                totalBlockedTime += taskStats.getTotalBlockedTime().roundTo(NANOSECONDS);

                rawInputDataSize += taskStats.getRawInputDataSize().toBytes();
                rawInputPositions += taskStats.getRawInputPositions();

                processedInputDataSize += taskStats.getProcessedInputDataSize().toBytes();
                processedInputPositions += taskStats.getProcessedInputPositions();

                outputDataSize += taskStats.getOutputDataSize().toBytes();
                outputPositions += taskStats.getOutputPositions();
            }

            StageStats stageStats = new StageStats(
                    schedulingComplete.get(),
                    getSplitDistribution.snapshot(),
View Full Code Here

Examples of gc.base.task.TaskStats

    this.setField(doc,FieldConstants.Task_IndexDate,new Date(System.currentTimeMillis()));
  }
 
  public void prepare(TaskContext context, XmlTypes xmlTypes,
      SolrInputDocument doc, DocInfo info) throws Exception {
    TaskStats stats = context.getStats();
    String tn = context.getTaskName()+".prepare";
   
    // make the metadata document
    long t1 = System.currentTimeMillis();
    Document dom = DomUtil.makeDom(info.Xml_Metadata,true);
    long t2 = System.currentTimeMillis();
    stats.incrementTime(tn+".makeXmlDom",t2-t1);
   
    // interrogate the metadata document
    XmlInterrogator interrogator = new XmlInterrogator();
    XmlType xmlType = interrogator.interrogate(xmlTypes,dom);
    XsltReference xsltReference = xmlType.getToSolrXslt();
    XsltTemplate xsltTemplate = XsltTemplates.getCompiledTemplate(xsltReference.getSrc());
    info.MetadataType_Key = xmlType.getKey();
    info.MetadataType_Identifier = xmlType.getIdentifier();
    info.MetadataType_Indexables_Version = xsltReference.getVersion();
    long t3 = System.currentTimeMillis();
    stats.incrementTime(tn+".interrogateXmlType",t3-t2);
   
    // append fields at the top of the document
    this.append(context,doc,info,true,false);
   
    // transform the metadata document to a Solr document
    // (this appends fields from the transform)
    SolrDocSaxHandler saxHandler = new SolrDocSaxHandler(doc);
    DOMSource source = new DOMSource(dom);
    SAXResult result = new SAXResult(saxHandler);
    xsltTemplate.transform(source,result,null);
    long t4 = System.currentTimeMillis();
    stats.incrementTime(tn+".transformToSolrDoc",t4-t3);
   
    // append remaining fields
    this.append(context,doc,info,false,true);
   
  }
View Full Code Here

Examples of org.apache.lucene.benchmark.byTask.stats.TaskStats

    List stats = benchmark.getRunData().getPoints().taskStats();

    // Count how many tokens all ReadTokens saw
    int totalTokenCount1 = 0;
    for (Iterator it = stats.iterator(); it.hasNext();) {
      TaskStats stat = (TaskStats) it.next();
      if (stat.getTask().getName().equals("ReadTokens")) {
        totalTokenCount1 += stat.getCount();
      }
    }

    // Separately count how many tokens are actually in the index:
    IndexReader reader = IndexReader.open(benchmark.getRunData().getDirectory(), true);
View Full Code Here

Examples of org.apache.lucene.benchmark.byTask.stats.TaskStats

    // 3. test counters
    int n = disable ? 0 : 1;
    int nChecked = 0;
    for (Iterator ts = benchmark.getRunData().getPoints().taskStats().iterator(); ts.hasNext();) {
      TaskStats stats = (TaskStats) ts.next();
      String taskName = stats.getTask().getName();
      if (taskName.equals("Rounds")) {
        assertEquals("Wrong total count!",20+2*n,stats.getCount());
        nChecked++;
      } else if (taskName.equals("CreateIndex")) {
        assertEquals("Wrong count for CreateIndex!",n,stats.getCount());
        nChecked++;
      } else if (taskName.equals("CloseIndex")) {
        assertEquals("Wrong count for CloseIndex!",n,stats.getCount());
        nChecked++;
      }
    }
    assertEquals("Missing some tasks to check!",3,nChecked);
  }
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.