@Test public void testAggregateCompleteLatency() { TopologyTimeSeriesMetrics.TimeSeriesComponentMetric metric = getTestMetric(); double actual = ComponentMetricSummary.aggregateCompleteLatency(metric); double expected = 331.789125d; Assert.assertEquals(expected, actual, DoubleUtils.EPSILON); }
@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); }
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); } }
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); } 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); }
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); } 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); Long getEmitted(); Long getAcked(); Long getFailed(); @JsonInclude(JsonInclude.Include.NON_NULL) Double getLatency(); @JsonInclude(JsonInclude.Include.NON_NULL) Double getCompleteLatency(); @JsonInclude(JsonInclude.Include.NON_NULL) Double getProcessTime(); @JsonInclude(JsonInclude.Include.NON_NULL) Double getExecuteTime(); Long getPrevEmitted(); Long getPrevAcked(); Long getPrevFailed(); @JsonInclude(JsonInclude.Include.NON_NULL) Double getPrevLatency(); @JsonInclude(JsonInclude.Include.NON_NULL) Double getPrevCompleteLatency(); @JsonInclude(JsonInclude.Include.NON_NULL) Double getPrevProcessTime(); @JsonInclude(JsonInclude.Include.NON_NULL) Double getPrevExecuteTime(); static ComponentMetricSummary convertTopologyMetric(TopologyTimeSeriesMetrics.TimeSeriesComponentMetric metrics,
                                                               TopologyTimeSeriesMetrics.TimeSeriesComponentMetric prevMetrics); static ComponentMetricSummary convertSourceMetric(TopologyTimeSeriesMetrics.TimeSeriesComponentMetric metrics,
                                                             TopologyTimeSeriesMetrics.TimeSeriesComponentMetric prevMetrics); static ComponentMetricSummary convertNonSourceMetric(TopologyTimeSeriesMetrics.TimeSeriesComponentMetric metrics,
                                                                TopologyTimeSeriesMetrics.TimeSeriesComponentMetric prevMetrics); }
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); } 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); Long getEmitted(); Long getAcked(); Long getFailed(); @JsonInclude(JsonInclude.Include.NON_NULL) Double getLatency(); @JsonInclude(JsonInclude.Include.NON_NULL) Double getCompleteLatency(); @JsonInclude(JsonInclude.Include.NON_NULL) Double getProcessTime(); @JsonInclude(JsonInclude.Include.NON_NULL) Double getExecuteTime(); Long getPrevEmitted(); Long getPrevAcked(); Long getPrevFailed(); @JsonInclude(JsonInclude.Include.NON_NULL) Double getPrevLatency(); @JsonInclude(JsonInclude.Include.NON_NULL) Double getPrevCompleteLatency(); @JsonInclude(JsonInclude.Include.NON_NULL) Double getPrevProcessTime(); @JsonInclude(JsonInclude.Include.NON_NULL) Double getPrevExecuteTime(); static ComponentMetricSummary convertTopologyMetric(TopologyTimeSeriesMetrics.TimeSeriesComponentMetric metrics,
                                                               TopologyTimeSeriesMetrics.TimeSeriesComponentMetric prevMetrics); static ComponentMetricSummary convertSourceMetric(TopologyTimeSeriesMetrics.TimeSeriesComponentMetric metrics,
                                                             TopologyTimeSeriesMetrics.TimeSeriesComponentMetric prevMetrics); static ComponentMetricSummary convertNonSourceMetric(TopologyTimeSeriesMetrics.TimeSeriesComponentMetric metrics,
                                                                TopologyTimeSeriesMetrics.TimeSeriesComponentMetric prevMetrics);  }