private CachedHistogram getWholeDcTracker(RouterOperation routerOperation, boolean isLocal) {
    CachedHistogram trackerToReturn;
    switch (routerOperation) {
      case GetBlobInfoOperation:
        trackerToReturn =
            isLocal ? routerMetrics.getBlobInfoLocalDcLatencyMs : routerMetrics.getBlobInfoCrossDcLatencyMs;
        break;
      case GetBlobOperation:
        trackerToReturn = isLocal ? routerMetrics.getBlobLocalDcLatencyMs : routerMetrics.getBlobCrossDcLatencyMs;
        break;
      case PutOperation:
        trackerToReturn = routerMetrics.putBlobLatencyMs;
        break;
      default:
        throw new IllegalArgumentException("Unsupported router operation when getting whole DC latency tracker.");
    }
    return trackerToReturn;
  }
Get certain whole DC latency histogram based on given arguments.
@param routerOperation the {@link RouterOperation} that uses this tracker.
@param isLocal {@code true} if local DC latency histogram should be returned. {@code false} otherwise.
@return whole DC latency histogram.
ambry-router/src/main/java/com/github/ambry/router/AdaptiveOperationTracker.java