int getCredits(Collection<K> keys, Object ... args) {
    if (creditFn == null) {
      return keys.size();
    } else {
      return keys.stream().mapToInt(k -> creditFn.getCredits(k, null, 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