Exemplo n.º 1
0
 protected void collectStatsProviders(Collection<StatsProvider> into) {
   into.add(
       new ProcessingStats(
           doneBatches.get() + queuedBatches.get(),
           doneBatches.get(),
           totalProcessingTime.total(),
           totalProcessingTime.average() / numberOfProcessors(),
           upstreamIdleTime.get(),
           downstreamIdleTime.get()));
   into.addAll(additionalStatsProvider);
 }
Exemplo n.º 2
0
 protected void resetStats() {
   downstreamIdleTime.set(0);
   upstreamIdleTime.set(0);
   queuedBatches.set(0);
   doneBatches.set(0);
   totalProcessingTime.reset();
   startTime = currentTimeMillis();
   endTime = 0;
 }