@Override
    public Object apply(Object message) {

      eventsConsumed.incrementAndGet();
      if (eventsConsumed.get() == 1) {
        startTime = Instant.now();
      }
      return message;
    }
Generic benchmark test for a test consumer but with samza framework
samza-tools/src/main/java/org/apache/samza/tools/benchmark/SystemConsumerWithSamzaBench.java