@Override
    public void visit(AdminRequest adminRequest) {
      switch (adminRequest.getType()) {
        case TriggerCompaction:
          metrics.triggerCompactionRequestQueueTimeInMs.update(requestQueueTime);
          metrics.triggerCompactionRequestRate.mark();
          metrics.triggerCompactionRequestProcessingTimeInMs.update(requestProcessingTime);
          responseQueueTimeHistogram = metrics.triggerCompactionResponseQueueTimeInMs;
          responseSendTimeHistogram = metrics.triggerCompactionResponseSendTimeInMs;
          requestTotalTimeHistogram = metrics.triggerCompactionRequestTotalTimeInMs;
          if (isRequestDropped) {
            metrics.triggerCompactionDroppedRate.mark();
            metrics.totalRequestDroppedRate.mark();
          }
          break;
        case RequestControl:
          metrics.requestControlRequestQueueTimeInMs.update(requestQueueTime);
          metrics.requestControlRequestRate.mark();
          metrics.requestControlRequestProcessingTimeInMs.update(requestProcessingTime);
          responseQueueTimeHistogram = metrics.requestControlResponseQueueTimeInMs;
          responseSendTimeHistogram = metrics.requestControlResponseSendTimeInMs;
          requestTotalTimeHistogram = metrics.requestControlRequestTotalTimeInMs;
          if (isRequestDropped) {
            metrics.requestControlDroppedRate.mark();
            metrics.totalRequestDroppedRate.mark();
          }
          break;
        case ReplicationControl:
          metrics.replicationControlRequestQueueTimeInMs.update(requestQueueTime);
          metrics.replicationControlRequestRate.mark();
          metrics.replicationControlRequestProcessingTimeInMs.update(requestProcessingTime);
          responseQueueTimeHistogram = metrics.replicationControlResponseQueueTimeInMs;
          responseSendTimeHistogram = metrics.replicationControlResponseSendTimeInMs;
          requestTotalTimeHistogram = metrics.replicationControlRequestTotalTimeInMs;
          if (isRequestDropped) {
            metrics.replicationControlDroppedRate.mark();
            metrics.totalRequestDroppedRate.mark();
          }
          break;
        case CatchupStatus:
          metrics.catchupStatusRequestQueueTimeInMs.update(requestQueueTime);
          metrics.catchupStatusRequestRate.mark();
          metrics.catchupStatusRequestProcessingTimeInMs.update(requestProcessingTime);
          responseQueueTimeHistogram = metrics.catchupStatusResponseQueueTimeInMs;
          responseSendTimeHistogram = metrics.catchupStatusResponseSendTimeInMs;
          requestTotalTimeHistogram = metrics.catchupStatusRequestTotalTimeInMs;
          if (isRequestDropped) {
            metrics.catchupStatusDroppedRate.mark();
            metrics.totalRequestDroppedRate.mark();
          }
          break;
        case BlobStoreControl:
          metrics.blobStoreControlRequestQueueTimeInMs.update(requestQueueTime);
          metrics.blobStoreControlRequestRate.mark();
          metrics.blobStoreControlRequestProcessingTimeInMs.update(requestProcessingTime);
          responseQueueTimeHistogram = metrics.blobStoreControlResponseQueueTimeInMs;
          responseSendTimeHistogram = metrics.blobStoreControlResponseSendTimeInMs;
          requestTotalTimeHistogram = metrics.blobStoreControlRequestTotalTimeInMs;
          if (isRequestDropped) {
            metrics.blobStoreControlDroppedRate.mark();
            metrics.totalRequestDroppedRate.mark();
          }
          break;
        case HealthCheck:
          metrics.healthCheckRequestQueueTimeInMs.update(requestQueueTime);
          metrics.healthCheckRequestRate.mark();
          metrics.healthCheckRequestProcessingTimeInMs.update(requestProcessingTime);
          responseQueueTimeHistogram = metrics.healthCheckResponseQueueTimeInMs;
          responseSendTimeHistogram = metrics.healthCheckResponseSendTimeInMs;
          requestTotalTimeHistogram = metrics.healthCheckRequestTotalTimeInMs;
          if (isRequestDropped) {
            metrics.healthCheckDroppedRate.mark();
            metrics.totalRequestDroppedRate.mark();
          }
          break;
        case BlobIndex:
          metrics.blobIndexRequestQueueTimeInMs.update(requestQueueTime);
          metrics.blobIndexRequestRate.mark();
          metrics.blobIndexRequestProcessingTimeInMs.update(requestProcessingTime);
          responseQueueTimeHistogram = metrics.blobIndexResponseQueueTimeInMs;
          responseSendTimeHistogram = metrics.blobIndexResponseSendTimeInMs;
          requestTotalTimeHistogram = metrics.blobIndexRequestTotalTimeInMs;
          if (isRequestDropped) {
            metrics.blobIndexDroppedRate.mark();
            metrics.totalRequestDroppedRate.mark();
          }
          break;
        case ForceDelete:
          metrics.forceDeleteRequestQueueTimeInMs.update(requestQueueTime);
          metrics.forceDeleteRequestRate.mark();
          metrics.forceDeleteRequestProcessingTimeInMs.update(requestProcessingTime);
          responseQueueTimeHistogram = metrics.forceDeleteResponseQueueTimeInMs;
          responseSendTimeHistogram = metrics.forceDeleteResponseSendTimeInMs;
          requestTotalTimeHistogram = metrics.forceDeleteRequestTotalTimeInMs;
          if (isRequestDropped) {
            metrics.forceDeleteDroppedRate.mark();
            metrics.totalRequestDroppedRate.mark();
          }
          break;
      }
    }
Used to update common metrics for the incoming request.
ambry-server/src/main/java/com/github/ambry/server/AmbryRequests.java