org.apache.commons.lang.time.StopWatch.split()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(168)

本文整理了Java中org.apache.commons.lang.time.StopWatch.split()方法的一些代码示例,展示了StopWatch.split()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。StopWatch.split()方法的具体详情如下:
包路径:org.apache.commons.lang.time.StopWatch
类名称:StopWatch
方法名:split

StopWatch.split介绍

[英]Split the time.

This method sets the stop time of the watch to allow a time to be extracted. The start time is unaffected, enabling #unsplit() to continue the timing from the original start point.
[中]分开时间。
此方法设置手表的停止时间,以便提取时间。开始时间不受影响,允许#unsplit()从原始开始点继续计时。

代码示例

代码示例来源:origin: io.openscore/score-queue-impl

stopWatch.split();
  for (QueueListener listener : listeners) {
    listener.prePersist(messages);
stopWatch.split();
if (stateMessages.size() > 0)
  executionQueueRepository.insertExecutionStates(stateMessages);
  stopWatch.split();
  List<ExecutionMessage> failedMessages = filter(messages, ExecStatus.FAILED);
  List<ExecutionMessage> terminatedMessages = filter(messages, ExecStatus.TERMINATED);

代码示例来源:origin: CloudSlang/score

stopWatch.split();
  for (QueueListener listener : listeners) {
    listener.prePersist(messages);
stopWatch.split();
if (stateMessages.size() > 0)
  executionQueueRepository.insertExecutionStates(stateMessages);
  stopWatch.split();
  List<ExecutionMessage> failedMessages = filter(messages, ExecStatus.FAILED);
  List<ExecutionMessage> terminatedMessages = filter(messages, ExecStatus.TERMINATED);

相关文章