int getEntryCredits(Collection<Entry<K, V>> entries, Object ... args) {
    if (creditFn == null) {
      return entries.size();
    } else {
      return entries.stream().mapToInt(e -> creditFn.getCredits(e.getKey(), e.getValue(), args)).sum();
    }
  }
Set up waitTimeMetric metric for latency reporting due to throttling.
@param timer waitTimeMetric metric
samza-api/src/main/java/org/apache/samza/table/remote/TableRateLimiter.java