* and timeLagConsumerCallbacksMs metrics should be -1.0, per the design spec.
*/
@Test
public void testHistogramMetricsAggregationNoData()
{
UnifiedClientStats unifiedClientStats1 = new UnifiedClientStats(1 /* ownerId */, "test1", "dim1");
UnifiedClientStats unifiedClientStats2 = new UnifiedClientStats(2 /* ownerId */, "test2", "dim2");
UnifiedClientStats unifiedClientStatsAgg = new UnifiedClientStats(99 /* ownerId */, "testAgg", "dimAgg");
assertEquals("unexpected timeLagSourceToReceiptMs 50th percentile for connection #1",
-1.0,
unifiedClientStats1.getTimeLagSourceToReceiptMs_HistPct_50());
assertEquals("unexpected timeLagSourceToReceiptMs 90th percentile for connection #1",
-1.0,
unifiedClientStats1.getTimeLagSourceToReceiptMs_HistPct_90());
assertEquals("unexpected timeLagSourceToReceiptMs 95th percentile for connection #1",
-1.0,
unifiedClientStats1.getTimeLagSourceToReceiptMs_HistPct_95());
assertEquals("unexpected timeLagSourceToReceiptMs 99th percentile for connection #1",
-1.0,
unifiedClientStats1.getTimeLagSourceToReceiptMs_HistPct_99());
assertEquals("unexpected timeLagSourceToReceiptMs 50th percentile for connection #2",
-1.0,
unifiedClientStats2.getTimeLagSourceToReceiptMs_HistPct_50());
assertEquals("unexpected timeLagSourceToReceiptMs 90th percentile for connection #2",
-1.0,
unifiedClientStats2.getTimeLagSourceToReceiptMs_HistPct_90());
assertEquals("unexpected timeLagSourceToReceiptMs 95th percentile for connection #2",
-1.0,
unifiedClientStats2.getTimeLagSourceToReceiptMs_HistPct_95());
assertEquals("unexpected timeLagSourceToReceiptMs 99th percentile for connection #2",
-1.0,
unifiedClientStats2.getTimeLagSourceToReceiptMs_HistPct_99());
assertEquals("unexpected timeLagSourceToReceiptMs 50th percentile for aggregated stats",
-1.0,
unifiedClientStatsAgg.getTimeLagSourceToReceiptMs_HistPct_50());
assertEquals("unexpected timeLagSourceToReceiptMs 90th percentile for aggregated stats",
-1.0,
unifiedClientStatsAgg.getTimeLagSourceToReceiptMs_HistPct_90());
assertEquals("unexpected timeLagSourceToReceiptMs 95th percentile for aggregated stats",
-1.0,
unifiedClientStatsAgg.getTimeLagSourceToReceiptMs_HistPct_95());
assertEquals("unexpected timeLagSourceToReceiptMs 99th percentile for aggregated stats",
-1.0,
unifiedClientStatsAgg.getTimeLagSourceToReceiptMs_HistPct_99());
assertEquals("unexpected timeLagConsumerCallbacksMs 50th percentile for connection #1",
-1.0,
unifiedClientStats1.getTimeLagConsumerCallbacksMs_HistPct_50());
assertEquals("unexpected timeLagConsumerCallbacksMs 90th percentile for connection #1",
-1.0,
unifiedClientStats1.getTimeLagConsumerCallbacksMs_HistPct_90());
assertEquals("unexpected timeLagConsumerCallbacksMs 95th percentile for connection #1",
-1.0,
unifiedClientStats1.getTimeLagConsumerCallbacksMs_HistPct_95());
assertEquals("unexpected timeLagConsumerCallbacksMs 99th percentile for connection #1",
-1.0,
unifiedClientStats1.getTimeLagConsumerCallbacksMs_HistPct_99());
assertEquals("unexpected timeLagConsumerCallbacksMs max for connection #1",
-1.0,
unifiedClientStats1.getTimeLagConsumerCallbacksMs_Max());
assertEquals("unexpected timeLagConsumerCallbacksMs 50th percentile for connection #2",
-1.0,
unifiedClientStats2.getTimeLagConsumerCallbacksMs_HistPct_50());
assertEquals("unexpected timeLagConsumerCallbacksMs 90th percentile for connection #2",
-1.0,
unifiedClientStats2.getTimeLagConsumerCallbacksMs_HistPct_90());
assertEquals("unexpected timeLagConsumerCallbacksMs 95th percentile for connection #2",
-1.0,
unifiedClientStats2.getTimeLagConsumerCallbacksMs_HistPct_95());
assertEquals("unexpected timeLagConsumerCallbacksMs 99th percentile for connection #2",
-1.0,
unifiedClientStats2.getTimeLagConsumerCallbacksMs_HistPct_99());
assertEquals("unexpected timeLagConsumerCallbacksMs max for connection #2",
-1.0,
unifiedClientStats2.getTimeLagConsumerCallbacksMs_Max());
assertEquals("unexpected timeLagConsumerCallbacksMs 50th percentile for aggregated stats",
-1.0,
unifiedClientStatsAgg.getTimeLagConsumerCallbacksMs_HistPct_50());
assertEquals("unexpected timeLagConsumerCallbacksMs 90th percentile for aggregated stats",
-1.0,
unifiedClientStatsAgg.getTimeLagConsumerCallbacksMs_HistPct_90());
assertEquals("unexpected timeLagConsumerCallbacksMs 95th percentile for aggregated stats",
-1.0,
unifiedClientStatsAgg.getTimeLagConsumerCallbacksMs_HistPct_95());
assertEquals("unexpected timeLagConsumerCallbacksMs 99th percentile for aggregated stats",
-1.0,
unifiedClientStatsAgg.getTimeLagConsumerCallbacksMs_HistPct_99());
assertEquals("unexpected timeLagConsumerCallbacksMs max for aggregated stats",
-1.0,
unifiedClientStatsAgg.getTimeLagConsumerCallbacksMs_Max());
}