コード例 #1
0
 @Override
 protected void initializeForSupportedLeaf(CounterInitializationContext counterContext) {
   MeasureVariations newConditions = getMeasureVariations(counterContext, metricKeys.getCovered());
   MeasureVariations uncoveredConditions =
       getMeasureVariations(counterContext, metricKeys.getUncovered());
   for (Period period : supportedPeriods(counterContext)) {
     long elements = getLongVariation(newConditions, period);
     this.elements.increment(period, elements);
     coveredElements.increment(period, elements - getLongVariation(uncoveredConditions, period));
   }
 }
コード例 #2
0
 @Override
 protected void initializeForSupportedLeaf(CounterInitializationContext counterContext) {
   this.elements = getLongMeasureValue(counterContext, metricKeys.getCovered());
   this.coveredElements =
       this.elements - getLongMeasureValue(counterContext, metricKeys.getUncovered());
 }