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();
 }
 @Override
 public void sent(long size) {
   txMetric.inc(size);
 }
 @Override
 public void received(long size) {
   rxMetric.inc(size);
 }
 void clear() {
   indexMetric.clear();
   deleteMetric.clear();
 }