class ComponentMetricSummary {

    @VisibleForTesting
    static double aggregateCompleteLatency(TopologyTimeSeriesMetrics.TimeSeriesComponentMetric metrics) {
        Map<Long, Double> keyMetrics = metrics.getMisc().getOrDefault(StormMappedMetric.completeLatency.name(), Collections.emptyMap());
        Map<Long, Double> weightMetrics = metrics.getMisc().getOrDefault(METRIC_NAME_ACK_COUNT, Collections.emptyMap());
        return calculateWeightedAverage(keyMetrics, weightMetrics);
    }

    public  ComponentMetricSummary(Long emitted, Long acked, Long failed, Double latency, Double completeLatency,
                                  Double processTime, Double executeTime,
                                  Long prevEmitted, Long prevAcked, Long prevFailed, Double prevLatency,
                                  Double prevCompleteLatency, Double prevProcessTime, Double prevExecuteTime);

}