用于Model对象转化为DO对象

@param throughputStat
@return throughputStatDO
322426
private ThroughputStatDO throughputStatModelToDo(ThroughputStat throughputStat) {
        ThroughputStatDO throughputStatDO = new ThroughputStatDO();
        throughputStatDO.setId(throughputStat.getId());
        throughputStatDO.setPipelineId(throughputStat.getPipelineId());
        throughputStatDO.setStartTime(throughputStat.getStartTime());
        throughputStatDO.setEndTime(throughputStat.getEndTime());
        throughputStatDO.setType(throughputStat.getType());
        throughputStatDO.setNumber(throughputStat.getNumber());
        throughputStatDO.setSize(throughputStat.getSize());
        throughputStatDO.setGmtCreate(throughputStat.getGmtCreate());
        throughputStatDO.setGmtModified(throughputStat.getGmtModified());
        return throughputStatDO;
    }
466393
public static InvocationStat getInvocationStat(InvocationStatDimension statDimension) {
        InvocationStat invocationStat = ALL_STATS.get(statDimension);
        if (invocationStat == null) {
            invocationStat = new ServiceExceptionInvocationStat(statDimension);
            InvocationStat old = ALL_STATS.putIfAbsent(statDimension, invocationStat);
            if (old != null) {
                invocationStat = old;
            }
            for (InvocationStatListener listener : LISTENERS) {
                listener.onAddInvocationStat(invocationStat);
            }
        }
        return invocationStat;
    }
782600
public static qos_stats get(nitro_service service) throws Exception{
		qos_stats obj = new qos_stats();
		qos_stats[] response = (qos_stats[])obj.stat_resources(service);
		return response[0];
	}
682629
public ClientAffinityStats getAggregateAffinityStats()
    {
        long afWrites = 0;
        long afReads = 0;
        long rrWrites = 0;
        long rrReads = 0;
        Map<Integer, ClientAffinityStats> affinityStats = getAffinityStats();
        for (Entry<Integer, ClientAffinityStats> e : affinityStats.entrySet()) {
            afWrites += e.getValue().getAffinityWrites();
            afReads += e.getValue().getAffinityReads();
            rrWrites += e.getValue().getRrWrites();
            rrReads += e.getValue().getRrReads();
        }
        ClientAffinityStats retval = new ClientAffinityStats(Integer.MAX_VALUE, afWrites, rrWrites,
               afReads, rrReads);
        return retval;
    }
124170
public static synchronized ExecutionStatistics get()
    {
        Thread currentThread = Thread.currentThread();
        if (stats.get(currentThread) == null)
        {
            stats.put(currentThread, new ExecutionStatistics());
        }
        return stats.get(currentThread);
    }
915352
public static int getCpuCores() {
        // 找不到文件或者异常，则去物理机的核心数
        int cpu = RpcConfigs.getIntValue(RpcOptions.SYSTEM_CPU_CORES);
        return cpu > 0 ? cpu : Runtime.getRuntime().availableProcessors();
    }
1044355
@Route(method = HttpMethod.GET, uri = "/monitor/executors.json")
    public Result data() {
        return ok(ImmutableMap.builder()
                        .put("executors", getExecutorsAsMap(executors))
                        .put("schedulers", getExecutorsAsMap(schedulers))
                        .put("hung", getHungTasks())
                        .put("completed", getCompletedTasks())
                        .build()
        );
    }
767136
def is_instance_throughput_too_low(self, inst_id):
        
        r = self.instance_throughput_ratio(inst_id)
        if r is None:
            logger.debug("{} instance {} throughput is not "
                         "measurable.".format(self, inst_id))
            return None
        too_low = r < self.Delta
        if too_low:
            logger.display("{}{} instance {} throughput ratio {} is lower than Delta {}.".
                           format(MONITORING_PREFIX, self, inst_id, r, self.Delta))
        else:
            logger.trace("{} instance {} throughput ratio {} is acceptable.".
                         format(self, inst_id, r))
        return too_low
1121874
@Service
    public Workflow getExecutionStatus(String workflowId, boolean includeTasks) {
        Workflow workflow = executionService.getExecutionStatus(workflowId, includeTasks);
        if (workflow == null) {
            throw new ApplicationException(ApplicationException.Code.NOT_FOUND,
                    String.format("Workflow with Id: %s not found.", workflowId));
        }
        return workflow;
    }
155253
public @NotNull Map<String, Integer> getStats() {
        int in = 0;
        int out = 0;
        for (Peer peer : peers.values()) {
            Map<String, Integer> connStats = peer.getStats();
            in += connStats.get("connections.in");
            out += connStats.get("connections.out");
        }

        Map<String, Integer> result = Maps.newHashMapWithExpectedSize(2);
        result.put("connections.in", in);
        result.put("connections.out", out);
        return result;
    }
1223780
private synchronized Long getMinTransformedProcessId() {
        if (!CollectionUtils.isEmpty(progress)) {
            Long processId = Collections.min(progress.keySet());
            StageProgress stage = progress.get(processId);
            // stage可能为空，针对select未完成时，对应的值就为null
            if (stage != null && stage != nullProgress && stage.getStage().isTransform()) {
                return processId;
            }
        }

        return null;
    }
1140310
@CommandArgument
  public void stat(int index) {
    if (reconnectCountdown > 0) {
      System.out.printf("Lost connection, reconnecting in %d seconds.\n", reconnectCountdown);
      return;
    }
    if (reconnectCountdown == 0) {
      System.out.println("Connecting...");
      return;
    }
    if (taskProgressStates == null) {
      System.out.println("Worker not running");
      return;
    }
    Iterator<ProgressState> iter = taskProgressStates.iterator();
    while (iter.hasNext()) {
      ProgressState state = iter.next();
      if (state.isCancelled() || state.isComplete()) {
        iter.remove();
      }
    }
    if (index == 0) { // print status of all workers.
      List<ProgressState> taskProgressStates = new ArrayList<ProgressState>(this.taskProgressStates);
      if (taskProgressStates != null) {
        System.out.println("  # Progress                         Status                             ");
        System.out.println("------------------------------------------------------------------------");
        for (int i = 0, n = taskProgressStates.size(); i < n; i++) {
          ProgressState state = taskProgressStates.get(i);
          char flag = ' ';
          if (state.isComplete()) {
            flag = '*';
          } else if (state.isCancelled()) {
            flag = 'X';
          } else if (state.isCancelPending()) {
            flag = 'C';
          }
          String status = state.getStatus();
          if (status.length() > 35) {
            status = status.substring(0, 34) + ">";
          }
          boolean indeterminant = state.isIndeterminant();
          double progress = state.getProgress();
          String progressBar;
          if (!indeterminant) {
            StringBuilder progressBarBuilder = new StringBuilder("|");
            for (int j = 0; j < 25; j++) {
              if (indeterminant) {
              }
              progressBarBuilder.append((progress >= (double) (j + 1) / 25.0) ? "=" : " ");
            }
            progressBarBuilder.append("|");
            progressBar = progressBarBuilder.toString();
          } else {
            progressBar = "|?????????????????????????|";
          }
          String progStr = (indeterminant ? "????" : String.format("% 3.0f%%", 100.0 * progress));
          System.out.printf("%c% 2d %s %s %-35s\n",
              flag, i + 1, progressBar, progStr, status);
        }
      }
    } else if (index > 0 && index <= this.taskProgressStates.size()) {
      // print status of a single worker.
      ProgressState state = this.taskProgressStates.get(index - 1);
      System.out.printf("Worker #%d", index);
      if (state.isComplete()) {
        System.out.print(" [COMPLETE]");
      } else if (state.isCancelled()) {
        System.out.print(" [CANCELLED]");
      } else if (state.isCancelPending()) {
        System.out.print(" [CANCEL PENDING]");
      }
      System.out.println();
      if (state.isIndeterminant()) {
        System.out.print("Progress : ???");
      } else {
        System.out.printf("Progress : %.2f%%", 100.0 * state.getProgress());
      }
      int maximum = state.getMaximum();
      int value = state.getValue();
      if (maximum > 0) {
        System.out.printf(" (%d/%d)", value, maximum);
      }
      System.out.println();
      System.out.printf("Status   : %s\n", state.getStatus());
    } else {
      System.err.println("Invalid worker number");
    }

  }
701189
public static cache_stats get(nitro_service service) throws Exception{
		cache_stats obj = new cache_stats();
		cache_stats[] response = (cache_stats[])obj.stat_resources(service);
		return response[0];
	}
682971
synchronized QueueStats getStatistics() {
        int size = this.writes.size();
        double fillRatio = calculateFillRatio(this.totalLength, size);
        int processingTime = this.lastDurationMillis;
        if (processingTime == 0 && size > 0) {
            // We get in here when this method is invoked prior to any operation being completed. Since lastDurationMillis
            // is only set when an item is completed, in this special case we just estimate based on the amount of time
            // the first item in the queue has been added.
            processingTime = (int) ((this.timeSupplier.get() - this.writes.peekFirst().getQueueAddedTimestamp()) / AbstractTimer.NANOS_TO_MILLIS);
        }

        return new QueueStats(size, fillRatio, processingTime);
    }
1340293
@Nullable
    public TransactionOutput getConnectedOutput() {
        if (fromTx != null) {
            return fromTx.getOutputs().get((int) index);
        } else if (connectedOutput != null) {
            return connectedOutput;
        }
        return null;
    }
716305
public static Interface_stats[] get(nitro_service service) throws Exception{
		Interface_stats obj = new Interface_stats();
		Interface_stats[] response = (Interface_stats[])obj.stat_resources(service);
		return response;
	}
724751
def _multiplyThroughputs(self):
        ''' 
        '''
        index = 0
        for component in self.components:
            if component.throughput != None:
                break
            index += 1

        return BaseObservationMode._multiplyThroughputs(self, index)