Class ServerMetrics


  • public final class ServerMetrics
    extends Object
    • Field Detail

      • NULL_METRICS

        public static final ServerMetrics NULL_METRICS
        Dummy instance useful for tests.
      • DEFAULT_METRICS_FOR_TESTS

        public static final ServerMetrics DEFAULT_METRICS_FOR_TESTS
        Dummy instance useful for tests.
      • FSYNC_TIME

        public final Summary FSYNC_TIME
        Txnlog fsync time
      • SNAPSHOT_TIME

        public final Summary SNAPSHOT_TIME
        Snapshot writing time
      • SNAPSHOT_ERROR_COUNT

        public final Counter SNAPSHOT_ERROR_COUNT
        Snapshot error count
      • SNAPSHOT_RATE_LIMITED_COUNT

        public final Counter SNAPSHOT_RATE_LIMITED_COUNT
        Snapshot rate limited count
      • RESTORE_TIME

        public final Summary RESTORE_TIME
        Restore time
      • RESTORE_ERROR_COUNT

        public final Counter RESTORE_ERROR_COUNT
        Restore error count
      • RESTORE_RATE_LIMITED_COUNT

        public final Counter RESTORE_RATE_LIMITED_COUNT
        Restore rate limited count
      • DB_INIT_TIME

        public final Summary DB_INIT_TIME
        Db init time (snapshot loading + txnlog replay)
      • READ_LATENCY

        public final Summary READ_LATENCY
        Stats for read request. The timing start from when the server see the request until it leave final request processor.
      • UPDATE_LATENCY

        public final Summary UPDATE_LATENCY
        Stats for request that need quorum voting. Timing is the same as read request. We only keep track of stats for request that originated from this machine only.
      • PROPAGATION_LATENCY

        public final Summary PROPAGATION_LATENCY
        Stats for all quorum request. The timing start from when the leader see the request until it reach the learner.
      • FOLLOWER_SYNC_TIME

        public final Summary FOLLOWER_SYNC_TIME
      • OBSERVER_SYNC_TIME

        public final Summary OBSERVER_SYNC_TIME
      • ELECTION_TIME

        public final Summary ELECTION_TIME
      • LOOKING_COUNT

        public final Counter LOOKING_COUNT
      • DIFF_COUNT

        public final Counter DIFF_COUNT
      • SNAP_COUNT

        public final Counter SNAP_COUNT
      • COMMIT_COUNT

        public final Counter COMMIT_COUNT
      • CONNECTION_REQUEST_COUNT

        public final Counter CONNECTION_REQUEST_COUNT
      • REVALIDATE_COUNT

        public final Counter REVALIDATE_COUNT
      • CONNECTION_DROP_COUNT

        public final Counter CONNECTION_DROP_COUNT
      • CONNECTION_REVALIDATE_COUNT

        public final Counter CONNECTION_REVALIDATE_COUNT
      • SESSIONLESS_CONNECTIONS_EXPIRED

        public final Counter SESSIONLESS_CONNECTIONS_EXPIRED
      • STALE_SESSIONS_EXPIRED

        public final Counter STALE_SESSIONS_EXPIRED
      • UNAVAILABLE_TIME

        public final Summary UNAVAILABLE_TIME
      • LEADER_UNAVAILABLE_TIME

        public final Summary LEADER_UNAVAILABLE_TIME
      • CONNECTION_TOKEN_DEFICIT

        public final Summary CONNECTION_TOKEN_DEFICIT
      • CONNECTION_REJECTED

        public final Counter CONNECTION_REJECTED
      • INFLIGHT_SNAP_COUNT

        public final Summary INFLIGHT_SNAP_COUNT
      • INFLIGHT_DIFF_COUNT

        public final Summary INFLIGHT_DIFF_COUNT
      • UNRECOVERABLE_ERROR_COUNT

        public final Counter UNRECOVERABLE_ERROR_COUNT
      • WRITE_PER_NAMESPACE

        public final SummarySet WRITE_PER_NAMESPACE
      • READ_PER_NAMESPACE

        public final SummarySet READ_PER_NAMESPACE
      • BYTES_RECEIVED_COUNT

        public final Counter BYTES_RECEIVED_COUNT
      • PREP_PROCESSOR_QUEUE_TIME

        public final Summary PREP_PROCESSOR_QUEUE_TIME
      • PREP_PROCESSOR_QUEUE_SIZE

        public final Summary PREP_PROCESSOR_QUEUE_SIZE
      • PREP_PROCESSOR_QUEUED

        public final Counter PREP_PROCESSOR_QUEUED
      • OUTSTANDING_CHANGES_QUEUED

        public final Counter OUTSTANDING_CHANGES_QUEUED
      • OUTSTANDING_CHANGES_REMOVED

        public final Counter OUTSTANDING_CHANGES_REMOVED
      • PREP_PROCESS_TIME

        public final Summary PREP_PROCESS_TIME
      • PROPOSAL_PROCESS_TIME

        public final Summary PROPOSAL_PROCESS_TIME
      • CLOSE_SESSION_PREP_TIME

        public final Summary CLOSE_SESSION_PREP_TIME
      • PROPOSAL_LATENCY

        public final Summary PROPOSAL_LATENCY
      • PROPOSAL_ACK_CREATION_LATENCY

        public final Summary PROPOSAL_ACK_CREATION_LATENCY
      • COMMIT_PROPAGATION_LATENCY

        public final Summary COMMIT_PROPAGATION_LATENCY
      • LEARNER_PROPOSAL_RECEIVED_COUNT

        public final Counter LEARNER_PROPOSAL_RECEIVED_COUNT
      • LEARNER_COMMIT_RECEIVED_COUNT

        public final Counter LEARNER_COMMIT_RECEIVED_COUNT
      • STARTUP_TXNS_LOADED

        public final Summary STARTUP_TXNS_LOADED
      • STARTUP_TXNS_LOAD_TIME

        public final Summary STARTUP_TXNS_LOAD_TIME
      • STARTUP_SNAP_LOAD_TIME

        public final Summary STARTUP_SNAP_LOAD_TIME
      • SYNC_PROCESSOR_QUEUE_AND_FLUSH_TIME

        public final Summary SYNC_PROCESSOR_QUEUE_AND_FLUSH_TIME
      • SYNC_PROCESSOR_QUEUE_SIZE

        public final Summary SYNC_PROCESSOR_QUEUE_SIZE
      • SYNC_PROCESSOR_QUEUED

        public final Counter SYNC_PROCESSOR_QUEUED
      • SYNC_PROCESSOR_QUEUE_TIME

        public final Summary SYNC_PROCESSOR_QUEUE_TIME
      • SYNC_PROCESSOR_FLUSH_TIME

        public final Summary SYNC_PROCESSOR_FLUSH_TIME
      • SYNC_PROCESS_TIME

        public final Summary SYNC_PROCESS_TIME
      • BATCH_SIZE

        public final Summary BATCH_SIZE
      • QUORUM_ACK_LATENCY

        public final Summary QUORUM_ACK_LATENCY
      • ACK_LATENCY

        public final SummarySet ACK_LATENCY
      • PROPOSAL_COUNT

        public final Counter PROPOSAL_COUNT
      • QUIT_LEADING_DUE_TO_DISLOYAL_VOTER

        public final Counter QUIT_LEADING_DUE_TO_DISLOYAL_VOTER
      • NODE_CREATED_WATCHER

        public final Summary NODE_CREATED_WATCHER
        Fired watcher stats.
      • NODE_DELETED_WATCHER

        public final Summary NODE_DELETED_WATCHER
      • NODE_CHANGED_WATCHER

        public final Summary NODE_CHANGED_WATCHER
      • NODE_CHILDREN_WATCHER

        public final Summary NODE_CHILDREN_WATCHER
      • ADD_DEAD_WATCHER_STALL_TIME

        public final Counter ADD_DEAD_WATCHER_STALL_TIME
      • DEAD_WATCHERS_QUEUED

        public final Counter DEAD_WATCHERS_QUEUED
      • DEAD_WATCHERS_CLEARED

        public final Counter DEAD_WATCHERS_CLEARED
      • DEAD_WATCHERS_CLEANER_LATENCY

        public final Summary DEAD_WATCHERS_CLEANER_LATENCY
      • RESPONSE_PACKET_CACHE_HITS

        public final Counter RESPONSE_PACKET_CACHE_HITS
      • RESPONSE_PACKET_CACHE_MISSING

        public final Counter RESPONSE_PACKET_CACHE_MISSING
      • RESPONSE_PACKET_GET_CHILDREN_CACHE_HITS

        public final Counter RESPONSE_PACKET_GET_CHILDREN_CACHE_HITS
      • RESPONSE_PACKET_GET_CHILDREN_CACHE_MISSING

        public final Counter RESPONSE_PACKET_GET_CHILDREN_CACHE_MISSING
      • LEARNER_HANDLER_QP_SIZE

        public final SummarySet LEARNER_HANDLER_QP_SIZE
        Learner handler quorum packet metrics.
      • LEARNER_HANDLER_QP_TIME

        public final SummarySet LEARNER_HANDLER_QP_TIME
      • REQUESTS_IN_SESSION_QUEUE

        public final Summary REQUESTS_IN_SESSION_QUEUE
      • PENDING_SESSION_QUEUE_SIZE

        public final Summary PENDING_SESSION_QUEUE_SIZE
      • READS_AFTER_WRITE_IN_SESSION_QUEUE

        public final Summary READS_AFTER_WRITE_IN_SESSION_QUEUE
      • READ_ISSUED_FROM_SESSION_QUEUE

        public final Summary READ_ISSUED_FROM_SESSION_QUEUE
      • SESSION_QUEUES_DRAINED

        public final Summary SESSION_QUEUES_DRAINED
      • TIME_WAITING_EMPTY_POOL_IN_COMMIT_PROCESSOR_READ

        public final Summary TIME_WAITING_EMPTY_POOL_IN_COMMIT_PROCESSOR_READ
      • WRITE_BATCH_TIME_IN_COMMIT_PROCESSOR

        public final Summary WRITE_BATCH_TIME_IN_COMMIT_PROCESSOR
      • CONCURRENT_REQUEST_PROCESSING_IN_COMMIT_PROCESSOR

        public final Summary CONCURRENT_REQUEST_PROCESSING_IN_COMMIT_PROCESSOR
      • READS_QUEUED_IN_COMMIT_PROCESSOR

        public final Summary READS_QUEUED_IN_COMMIT_PROCESSOR
      • WRITES_QUEUED_IN_COMMIT_PROCESSOR

        public final Summary WRITES_QUEUED_IN_COMMIT_PROCESSOR
      • COMMITS_QUEUED_IN_COMMIT_PROCESSOR

        public final Summary COMMITS_QUEUED_IN_COMMIT_PROCESSOR
      • COMMITS_QUEUED

        public final Counter COMMITS_QUEUED
      • READS_ISSUED_IN_COMMIT_PROC

        public final Summary READS_ISSUED_IN_COMMIT_PROC
      • WRITES_ISSUED_IN_COMMIT_PROC

        public final Summary WRITES_ISSUED_IN_COMMIT_PROC
      • THROTTLED_OPS

        public final Counter THROTTLED_OPS
      • READ_COMMITPROC_TIME

        public final Summary READ_COMMITPROC_TIME
        Time spent by a read request in the commit processor.
      • WRITE_COMMITPROC_TIME

        public final Summary WRITE_COMMITPROC_TIME
        Time spent by a write request in the commit processor.
      • LOCAL_WRITE_COMMITTED_TIME

        public final Summary LOCAL_WRITE_COMMITTED_TIME
        Time spent by a committed request, for a locally issued write, in the commit processor.
      • SERVER_WRITE_COMMITTED_TIME

        public final Summary SERVER_WRITE_COMMITTED_TIME
        Time spent by a committed request for a write, issued by other server, in the commit processor.
      • COMMIT_PROCESS_TIME

        public final Summary COMMIT_PROCESS_TIME
      • OM_PROPOSAL_PROCESS_TIME

        public final Summary OM_PROPOSAL_PROCESS_TIME
        Observer Master processing metrics.
      • OM_COMMIT_PROCESS_TIME

        public final Summary OM_COMMIT_PROCESS_TIME
      • READ_FINAL_PROC_TIME

        public final Summary READ_FINAL_PROC_TIME
        Time spent by the final processor. This is tracked in the commit processor.
      • WRITE_FINAL_PROC_TIME

        public final Summary WRITE_FINAL_PROC_TIME
      • ENSEMBLE_AUTH_SUCCESS

        public final Counter ENSEMBLE_AUTH_SUCCESS
      • ENSEMBLE_AUTH_FAIL

        public final Counter ENSEMBLE_AUTH_FAIL
      • ENSEMBLE_AUTH_SKIP

        public final Counter ENSEMBLE_AUTH_SKIP
      • STALE_REQUESTS

        public final Counter STALE_REQUESTS
      • STALE_REQUESTS_DROPPED

        public final Counter STALE_REQUESTS_DROPPED
      • STALE_REPLIES

        public final Counter STALE_REPLIES
      • REQUEST_THROTTLE_QUEUE_TIME

        public final Summary REQUEST_THROTTLE_QUEUE_TIME
      • REQUEST_THROTTLE_WAIT_COUNT

        public final Counter REQUEST_THROTTLE_WAIT_COUNT
      • LARGE_REQUESTS_REJECTED

        public final Counter LARGE_REQUESTS_REJECTED
      • NETTY_QUEUED_BUFFER

        public final Summary NETTY_QUEUED_BUFFER
      • DIGEST_MISMATCHES_COUNT

        public final Counter DIGEST_MISMATCHES_COUNT
      • LEARNER_REQUEST_PROCESSOR_QUEUE_SIZE

        public final Summary LEARNER_REQUEST_PROCESSOR_QUEUE_SIZE
      • UNSUCCESSFUL_HANDSHAKE

        public final Counter UNSUCCESSFUL_HANDSHAKE
      • INSECURE_ADMIN

        public final Counter INSECURE_ADMIN
      • TLS_HANDSHAKE_EXCEEDED

        public final Counter TLS_HANDSHAKE_EXCEEDED
      • CNXN_CLOSED_WITHOUT_ZK_SERVER_RUNNING

        public final Counter CNXN_CLOSED_WITHOUT_ZK_SERVER_RUNNING
      • SKIP_LEARNER_REQUEST_TO_NEXT_PROCESSOR_COUNT

        public final Counter SKIP_LEARNER_REQUEST_TO_NEXT_PROCESSOR_COUNT
      • SOCKET_CLOSING_TIME

        public final Summary SOCKET_CLOSING_TIME
      • REQUESTS_NOT_FORWARDED_TO_COMMIT_PROCESSOR

        public final Counter REQUESTS_NOT_FORWARDED_TO_COMMIT_PROCESSOR
      • RESPONSE_BYTES

        public final Counter RESPONSE_BYTES
        Number of response/watch bytes written to clients.
      • WATCH_BYTES

        public final Counter WATCH_BYTES
      • JVM_PAUSE_TIME

        public final Summary JVM_PAUSE_TIME
      • QUOTA_EXCEEDED_ERROR_PER_NAMESPACE

        public final CounterSet QUOTA_EXCEEDED_ERROR_PER_NAMESPACE
    • Method Detail

      • getMetrics

        public static ServerMetrics getMetrics()
        Access current ServerMetrics.
        Returns:
        a reference to the current Metrics
      • metricsProviderInitialized

        public static void metricsProviderInitialized​(MetricsProvider metricsProvider)
      • resetAll

        public void resetAll()