@Test public void testCombine() { OverAllQueryMetrics otherMetrics = new OverAllQueryMetrics(true, LogLevel.TRACE); final long otherNumParallelScans = 9L; final int otherQueryTimeouts = 8; final int otherQueryFailures = 7; final int otherCacheRefreshes = 6; populateMetrics(otherMetrics, otherNumParallelScans, otherQueryTimeouts, otherQueryFailures, otherCacheRefreshes); OverAllQueryMetrics finalMetricObj = this.overAllQueryMetrics.combine(otherMetrics); assertPublishedMetrics(finalMetricObj.publish(), numParallelScans + otherNumParallelScans, queryTimeouts + otherQueryTimeouts, queryFailures + otherQueryFailures, cacheRefreshesDueToSplits + otherCacheRefreshes, 0L); }
public OverAllQueryMetrics combine(OverAllQueryMetrics metric) { cacheRefreshedDueToSplits.combine(metric.cacheRefreshedDueToSplits); queryFailed.combine(metric.queryFailed); queryTimedOut.combine(metric.queryTimedOut); numParallelScans.combine(metric.numParallelScans); return this; }
OverAllQueryMetrics { public OverAllQueryMetrics combine(OverAllQueryMetrics metric) { cacheRefreshedDueToSplits.combine(metric.cacheRefreshedDueToSplits); queryFailed.combine(metric.queryFailed); queryTimedOut.combine(metric.queryTimedOut); numParallelScans.combine(metric.numParallelScans); return this; } }
OverAllQueryMetrics { public OverAllQueryMetrics combine(OverAllQueryMetrics metric) { cacheRefreshedDueToSplits.combine(metric.cacheRefreshedDueToSplits); queryFailed.combine(metric.queryFailed); queryTimedOut.combine(metric.queryTimedOut); numParallelScans.combine(metric.numParallelScans); return this; } OverAllQueryMetrics(boolean isRequestMetricsEnabled, LogLevel connectionLogLevel); }
OverAllQueryMetrics { public OverAllQueryMetrics combine(OverAllQueryMetrics metric) { cacheRefreshedDueToSplits.combine(metric.cacheRefreshedDueToSplits); queryFailed.combine(metric.queryFailed); queryTimedOut.combine(metric.queryTimedOut); numParallelScans.combine(metric.numParallelScans); return this; } OverAllQueryMetrics(boolean isRequestMetricsEnabled, LogLevel connectionLogLevel); void updateNumParallelScans(long numParallelScans); void queryTimedOut(); void queryFailed(); void cacheRefreshedDueToSplits(); void startQuery(); void endQuery(); void startResultSetWatch(); void stopResultSetWatch(); Map<MetricType, Long> publish(); void reset(); OverAllQueryMetrics combine(OverAllQueryMetrics metric); }
OverAllQueryMetrics { public OverAllQueryMetrics combine(OverAllQueryMetrics metric) { cacheRefreshedDueToSplits.combine(metric.cacheRefreshedDueToSplits); queryFailed.combine(metric.queryFailed); queryTimedOut.combine(metric.queryTimedOut); numParallelScans.combine(metric.numParallelScans); return this; } OverAllQueryMetrics(boolean isRequestMetricsEnabled, LogLevel connectionLogLevel); void updateNumParallelScans(long numParallelScans); void queryTimedOut(); void queryFailed(); void cacheRefreshedDueToSplits(); void startQuery(); void endQuery(); void startResultSetWatch(); void stopResultSetWatch(); Map<MetricType, Long> publish(); void reset(); OverAllQueryMetrics combine(OverAllQueryMetrics metric);  }