Esempio 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);
 }
Esempio n. 2
0
 protected void resetStats() {
   downstreamIdleTime.set(0);
   upstreamIdleTime.set(0);
   queuedBatches.set(0);
   doneBatches.set(0);
   totalProcessingTime.reset();
   startTime = currentTimeMillis();
   endTime = 0;
 }