Class MetricFactory


  • public class MetricFactory
    extends java.lang.Object
    • Constructor Detail

      • MetricFactory

        public MetricFactory()
    • Method Detail

      • absolute

        public AbsoluteMetric absolute​(java.lang.String group,
                                       java.lang.String name)
      • timeAveraging

        public TimeAveragingMetric timeAveraging​(java.lang.String group,
                                                 java.lang.String name,
                                                 long windowLength,
                                                 long checkpointMs,
                                                 long purgeMs)
      • timeAveraging

        public TimeAveragingMetric timeAveraging​(java.lang.String group,
                                                 java.lang.String name,
                                                 long windowLengthMs)
      • percentile

        public ApproxPercentileMetric percentile​(java.lang.String group,
                                                 java.lang.String name,
                                                 long duration,
                                                 long window)
        Construct the metric.
        Parameters:
        group - group name
        name - metric name
        duration - total duration of the statistic in ms
        window - windowNs size in ms
        Returns:
        the metric
      • gauge

        public GaugeMetric gauge​(java.lang.String group,
                                 java.lang.String name)
        Construct the metric.
        Parameters:
        group - group of the metric
        name - name of the metric
        Returns:
        new gauge metric