Class StatisticSuppliers


  • public final class StatisticSuppliers
    extends Object
    Miscellaneous utilities for working with StatisticSupplier's.
    • Method Detail

      • combine

        public static StatisticSupplier combine​(StatisticDefinition<?> definition,
                                                List<? extends StatisticSupplier> suppliers)
        Creates a statistics supplier that combines the given set of suppliers. Similar to StatisticDefinition.aggregate(List) the key difference is that the returned value is live rather than a snapshot.
        Parameters:
        definition - the definition
        suppliers - the list of suppliers
        Returns:
        a live statistics supplier whose methods aggregate the components
        Throws:
        ClassCastException - if any of the values are not of the typed expected by the definition.
      • aggregate

        public static StatisticsMap aggregate​(List<RuntimeStatistic<?>> details)
        Performs aggregation across statistic details by the standard aggregation defined for each StatisticDefinition. Statistics are first grouped by definition and then aggregated.
        Parameters:
        details - the list of statistics to aggregate
        Returns:
        the aggregated statistics