Class GrpcProxyMetrics

    • Field Detail

      • MIN_SNAPSHOT_REFRESH

        public static final long MIN_SNAPSHOT_REFRESH
        The minimum amount of time between request duration histogram snapshots.
        See Also:
        Constant Field Values
    • Method Detail

      • addRequestDuration

        public void addRequestDuration​(long nanos)
        Add a timing sample to the metrics.
        Parameters:
        nanos - the request time in nanos.
      • addMessageDuration

        public void addMessageDuration​(long nanos)
        Add a timing sample to the metrics.
        Parameters:
        nanos - the request time in nanos.
      • markSuccess

        public void markSuccess()
        Update the successful request meter.
      • markError

        public void markError()
        Update the failed request meter.
      • markSent

        public void markSent()
        Update the messages sent meter.
      • markReceived

        public void markReceived()
        Update the messages received meter.
      • getErrorRequestFifteenMinuteRate

        public double getErrorRequestFifteenMinuteRate()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the fifteen minute rate of requests that responded with an error.
        Specified by:
        getErrorRequestFifteenMinuteRate in interface GrpcProxyMetricsMBean
        Returns:
        the fifteen minute rate of requests that responded with an error
      • getErrorRequestFiveMinuteRate

        public double getErrorRequestFiveMinuteRate()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the five minute rate of requests that responded with an error.
        Specified by:
        getErrorRequestFiveMinuteRate in interface GrpcProxyMetricsMBean
        Returns:
        the five minute rate of requests that responded with an error
      • getErrorRequestOneMinuteRate

        public double getErrorRequestOneMinuteRate()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the one minute rate of requests that responded with an error.
        Specified by:
        getErrorRequestOneMinuteRate in interface GrpcProxyMetricsMBean
        Returns:
        the one minute rate of requests that responded with an error
      • getErrorRequestMeanRate

        public double getErrorRequestMeanRate()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the mean rate of requests that responded with an error.
        Specified by:
        getErrorRequestMeanRate in interface GrpcProxyMetricsMBean
        Returns:
        the mean rate of requests that responded with an error
      • getRequestDuration75thPercentile

        public double getRequestDuration75thPercentile()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the 75th percentile value from the distribution of samples in the latest snapshot of the request duration metric.
        Specified by:
        getRequestDuration75thPercentile in interface GrpcProxyMetricsMBean
        Returns:
        the 75th percentile value from the distribution of samples in the latest snapshot of the request duration metric.
      • getRequestDuration95thPercentile

        public double getRequestDuration95thPercentile()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the 95th percentile value from the distribution of samples in the latest snapshot of the request duration metric.
        Specified by:
        getRequestDuration95thPercentile in interface GrpcProxyMetricsMBean
        Returns:
        the 95th percentile value from the distribution of samples in the latest snapshot of the request duration metric.
      • getRequestDuration98thPercentile

        public double getRequestDuration98thPercentile()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the 98th percentile value from the distribution of samples in the latest snapshot of the request duration metric.
        Specified by:
        getRequestDuration98thPercentile in interface GrpcProxyMetricsMBean
        Returns:
        the 98th percentile value from the distribution of samples in the latest snapshot of the request duration metric.
      • getRequestDuration99thPercentile

        public double getRequestDuration99thPercentile()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the 99th percentile value from the distribution of samples in the latest snapshot of the request duration metric.
        Specified by:
        getRequestDuration99thPercentile in interface GrpcProxyMetricsMBean
        Returns:
        the 99th percentile value from the distribution of samples in the latest snapshot of the request duration metric.
      • getRequestDuration999thPercentile

        public double getRequestDuration999thPercentile()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the 99.9th percentile value from the distribution of samples in the latest snapshot of the request duration metric.
        Specified by:
        getRequestDuration999thPercentile in interface GrpcProxyMetricsMBean
        Returns:
        the 99.9th percentile value from the distribution of samples in the latest snapshot of the request duration metric.
      • getRequestDurationMax

        public double getRequestDurationMax()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the maximum value from the distribution of samples in the latest snapshot of the request duration metric.
        Specified by:
        getRequestDurationMax in interface GrpcProxyMetricsMBean
        Returns:
        the maximum value from the distribution of samples in the latest snapshot of the request duration metric.
      • getRequestDurationMean

        public double getRequestDurationMean()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the mean value from the distribution of samples in the latest snapshot of the request duration metric.
        Specified by:
        getRequestDurationMean in interface GrpcProxyMetricsMBean
        Returns:
        the mean value from the distribution of samples in the latest snapshot of the request duration metric.
      • getRequestDurationMin

        public double getRequestDurationMin()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the minimum value from the distribution of samples in the latest snapshot of the request duration metric.
        Specified by:
        getRequestDurationMin in interface GrpcProxyMetricsMBean
        Returns:
        the minimum value from the distribution of samples in the latest snapshot of the request duration metric.
      • getRequestDurationStdDev

        public double getRequestDurationStdDev()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the standard deviation from the distribution of samples in the latest snapshot of the request duration metric.
        Specified by:
        getRequestDurationStdDev in interface GrpcProxyMetricsMBean
        Returns:
        the standard deviation from the distribution of samples in the latest snapshot of the request duration metric.
      • getMessageDuration75thPercentile

        public double getMessageDuration75thPercentile()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the 75th percentile value from the distribution of samples in the latest snapshot of the message duration metric.
        Specified by:
        getMessageDuration75thPercentile in interface GrpcProxyMetricsMBean
        Returns:
        the 75th percentile value from the distribution of samples in the latest snapshot of the message duration metric.
      • getMessageDuration95thPercentile

        public double getMessageDuration95thPercentile()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the 95th percentile value from the distribution of samples in the latest snapshot of the message duration metric.
        Specified by:
        getMessageDuration95thPercentile in interface GrpcProxyMetricsMBean
        Returns:
        the 95th percentile value from the distribution of samples in the latest snapshot of the message duration metric.
      • getMessageDuration98thPercentile

        public double getMessageDuration98thPercentile()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the 98th percentile value from the distribution of samples in the latest snapshot of the message duration metric.
        Specified by:
        getMessageDuration98thPercentile in interface GrpcProxyMetricsMBean
        Returns:
        the 98th percentile value from the distribution of samples in the latest snapshot of the message duration metric.
      • getMessageDuration99thPercentile

        public double getMessageDuration99thPercentile()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the 99th percentile value from the distribution of samples in the latest snapshot of the message duration metric.
        Specified by:
        getMessageDuration99thPercentile in interface GrpcProxyMetricsMBean
        Returns:
        the 99th percentile value from the distribution of samples in the latest snapshot of the message duration metric.
      • getMessageDuration999thPercentile

        public double getMessageDuration999thPercentile()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the 99.9th percentile value from the distribution of samples in the latest snapshot of the message duration metric.
        Specified by:
        getMessageDuration999thPercentile in interface GrpcProxyMetricsMBean
        Returns:
        the 99.9th percentile value from the distribution of samples in the latest snapshot of the message duration metric.
      • getMessageDurationMax

        public double getMessageDurationMax()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the maximum value from the distribution of samples in the latest snapshot of the message duration metric.
        Specified by:
        getMessageDurationMax in interface GrpcProxyMetricsMBean
        Returns:
        the maximum value from the distribution of samples in the latest snapshot of the message duration metric.
      • getMessageDurationMean

        public double getMessageDurationMean()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the mean value from the distribution of samples in the latest snapshot of the message duration metric.
        Specified by:
        getMessageDurationMean in interface GrpcProxyMetricsMBean
        Returns:
        the mean value from the distribution of samples in the latest snapshot of the message duration metric.
      • getMessageDurationMin

        public double getMessageDurationMin()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the minimum value from the distribution of samples in the latest snapshot of the message duration metric.
        Specified by:
        getMessageDurationMin in interface GrpcProxyMetricsMBean
        Returns:
        the minimum value from the distribution of samples in the latest snapshot of the message duration metric.
      • getMessageDurationStdDev

        public double getMessageDurationStdDev()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the standard deviation from the distribution of samples in the latest snapshot of the message duration metric.
        Specified by:
        getMessageDurationStdDev in interface GrpcProxyMetricsMBean
        Returns:
        the standard deviation from the distribution of samples in the latest snapshot of the message duration metric.
      • getTaskBacklog

        public int getTaskBacklog()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the number of tasks that have been added to the pool, but not yet scheduled for execution.
        Specified by:
        getTaskBacklog in interface GrpcProxyMetricsMBean
        Returns:
        the number of tasks that have been added to the pool, but not yet scheduled for execution
      • getDaemonCountMax

        public int getDaemonCountMax()
        Description copied from interface: GrpcProxyMetricsMBean
        Returns the maximum number of daemon threads that the pool can create.
        Specified by:
        getDaemonCountMax in interface GrpcProxyMetricsMBean
        Returns:
        the maximum number of daemon threads that the pool can create
      • getDaemonCountMin

        public int getDaemonCountMin()
        Description copied from interface: GrpcProxyMetricsMBean
        Returns the minimum number of daemon threads that the pool should have.
        Specified by:
        getDaemonCountMin in interface GrpcProxyMetricsMBean
        Returns:
        the minimum number of daemon threads that the pool should have
      • getDaemonCount

        public int getDaemonCount()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the number of Daemon threads that exist, if the pool has been started, or the number of Daemon threads that will be created, if the pool has not yet been started.
        Specified by:
        getDaemonCount in interface GrpcProxyMetricsMBean
        Returns:
        the number of Daemon threads that exist
      • getAbandonedThreadCount

        public int getAbandonedThreadCount()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the total number of abandoned Daemon threads.

        Note: this property is purposely not reset when stats are reset.

        Specified by:
        getAbandonedThreadCount in interface GrpcProxyMetricsMBean
        Returns:
        the total number of abandoned Daemon threads
      • getTaskActiveMillis

        public long getTaskActiveMillis()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the total number of milliseconds spent by all Daemon threads while executing tasks since the last time the statistics were reset.

        Note: this value could be greater then the time elapsed since each daemon adds its own processing time when working in parallel.

        Specified by:
        getTaskActiveMillis in interface GrpcProxyMetricsMBean
        Returns:
        the total number of milliseconds spent by all Daemon threads while executing tasks since the last time the statistics were reset
      • getHungTaskCount

        public int getHungTaskCount()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the total number of currently executing hung tasks.

        Note: this property is purposely not reset when stats are reset.

        Specified by:
        getHungTaskCount in interface GrpcProxyMetricsMBean
        Returns:
        the total number of currently executing hung tasks
      • getHungTaskDuration

        public long getHungTaskDuration()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the longest currently executing hung task duration (in milliseconds).

        Note: this property is purposely not reset when stats are reset.

        Specified by:
        getHungTaskDuration in interface GrpcProxyMetricsMBean
        Returns:
        the longest currently executing hung task duration (in milliseconds)
      • getTaskAddCount

        public long getTaskAddCount()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the total number of tasks added to the pool since the last time the statistics were reset.
        Specified by:
        getTaskAddCount in interface GrpcProxyMetricsMBean
        Returns:
        the total number of tasks added to the pool since the last time the statistics were reset
      • getTaskCount

        public long getTaskCount()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the total number of tasks executed by Daemon threads since the last time the statistics were reset.
        Specified by:
        getTaskCount in interface GrpcProxyMetricsMBean
        Returns:
        the total number of tasks executed by Daemon threads since the last time the statistics were reset
      • getMaxTaskBacklog

        public int getMaxTaskBacklog()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the maximum backlog value since the last time the statistics were reset.
        Specified by:
        getMaxTaskBacklog in interface GrpcProxyMetricsMBean
        Returns:
        the maximum backlog value since the last time the statistics were reset
      • getTaskTimeoutCount

        public int getTaskTimeoutCount()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the total number of timed-out tasks since the last time the statistics were reset.
        Specified by:
        getTaskTimeoutCount in interface GrpcProxyMetricsMBean
        Returns:
        the total number of timed-out tasks since the last time the statistics were reset
      • getTaskTimeout

        public long getTaskTimeout()
        Description copied from interface: GrpcProxyMetricsMBean
        Return the default timeout value for PriorityTasks that don't explicitly specify the execution timeout value.
        Specified by:
        getTaskTimeout in interface GrpcProxyMetricsMBean
        Returns:
        the default timeout value for PriorityTasks that don't explicitly specify the execution timeout value
      • registerMBean

        public void registerMBean​(Registry registry)
        Registers an MBean for this GrpcProxyMetrics.