Class HistogramUtils

    • Method Detail

      • pointFromKeyAndDigest

        public static wavefront.report.ReportPoint pointFromKeyAndDigest​(HistogramKey histogramKey,
                                                                         AgentDigest agentDigest)
        Creates a ReportPoint from a HistogramKey - AgentDigest pair
        Parameters:
        histogramKey - the key, defining metric, source, annotations, duration and start-time
        agentDigest - the digest defining the centroids
        Returns:
        the corresponding point
      • granularityToString

        public static String granularityToString​(@Nullable
                                                 Granularity granularity)
        Convert granularity to string. If null, we assume we are dealing with "distribution" port.
        Parameters:
        granularity - granularity
        Returns:
        string representation
      • mergeHistogram

        public static void mergeHistogram​(com.tdunning.math.stats.TDigest target,
                                          wavefront.report.Histogram source)
        Merges a histogram into a TDigest
        Parameters:
        target - target TDigest
        source - histogram to merge