public void endGatewayBatch(long startTime, boolean timedOut, boolean failed) {
    long duration = getStatTime() - startTime;
    endClientOp(duration, timedOut, failed);
    stats.incInt(gatewayBatchInProgressId, -1);
    int endGatewayBatchId;
    if (timedOut) {
      endGatewayBatchId = gatewayBatchTimedOutId;
    } else if (failed) {
      endGatewayBatchId = gatewayBatchFailedId;
    } else {
      endGatewayBatchId = gatewayBatchId;
    }
    stats.incInt(endGatewayBatchId, 1);
    stats.incLong(gatewayBatchDurationId, duration);
  }
Records that the specified gatewayBatch has ended

@param startTime the value returned by {@link #startGatewayBatch}.
@param timedOut true if gatewayBatch timed out
@param failed true if gatewayBatch failed
geode-core/src/main/java/org/apache/geode/cache/client/internal/ConnectionStats.java