public SearchStats.Stats stats() {
   return new SearchStats.Stats(
       queryMetric.count(),
       TimeUnit.NANOSECONDS.toMillis(queryMetric.sum()),
       queryCurrent.count(),
       fetchMetric.count(),
       TimeUnit.NANOSECONDS.toMillis(fetchMetric.sum()),
       fetchCurrent.count());
 }
 IndexingStats.Stats stats(boolean isThrottled, long currentThrottleMillis) {
   return new IndexingStats.Stats(
       indexMetric.count(),
       TimeUnit.NANOSECONDS.toMillis(indexMetric.sum()),
       indexCurrent.count(),
       indexFailed.count(),
       deleteMetric.count(),
       TimeUnit.NANOSECONDS.toMillis(deleteMetric.sum()),
       deleteCurrent.count(),
       noopUpdates.count(),
       isThrottled,
       TimeUnit.MILLISECONDS.toMillis(currentThrottleMillis));
 }
 public void clear() {
   queryMetric.clear();
   fetchMetric.clear();
 }
예제 #4
0
 @Override
 public void sent(long size) {
   txMetric.inc(size);
 }
예제 #5
0
 @Override
 public void received(long size) {
   rxMetric.inc(size);
 }
 void clear() {
   indexMetric.clear();
   deleteMetric.clear();
 }