summaryrefslogtreecommitdiffstats
path: root/container-core
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-09-29 08:19:53 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2022-09-29 08:19:53 +0200
commitb3713cfabf097191635c4545d5d4d958997878e3 (patch)
tree81eb82506edd7da764157792c7554ddfa07d738d /container-core
parent8d5ae86958bf7bab1d2d06cb94dc81da8aff56e7 (diff)
Remove all traces from computeCoverageFromTargetActiveDocs
Diffstat (limited to 'container-core')
-rw-r--r--container-core/abi-spec.json1
-rw-r--r--container-core/src/main/java/com/yahoo/container/handler/Coverage.java17
-rw-r--r--container-core/src/main/java/com/yahoo/container/logging/Coverage.java9
3 files changed, 4 insertions, 23 deletions
diff --git a/container-core/abi-spec.json b/container-core/abi-spec.json
index e39391fa4a3..59c2941ec33 100644
--- a/container-core/abi-spec.json
+++ b/container-core/abi-spec.json
@@ -219,7 +219,6 @@
"public int getFullResultSets()",
"public int getResultSets()",
"public int getResultPercentage()",
- "public com.yahoo.container.handler.Coverage useTargetActiveForCoverageComputation(boolean)",
"public com.yahoo.container.logging.Coverage toLoggingCoverage()"
],
"fields": [
diff --git a/container-core/src/main/java/com/yahoo/container/handler/Coverage.java b/container-core/src/main/java/com/yahoo/container/handler/Coverage.java
index fdcd225ddf5..fccce9cc8fb 100644
--- a/container-core/src/main/java/com/yahoo/container/handler/Coverage.java
+++ b/container-core/src/main/java/com/yahoo/container/handler/Coverage.java
@@ -1,8 +1,6 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.container.handler;
-import com.yahoo.api.annotations.Beta;
-
/**
* The coverage report for a result set.
*
@@ -11,7 +9,6 @@ import com.yahoo.api.annotations.Beta;
*/
public class Coverage {
- private boolean useTargetActiveForCoverageComputation = false;
protected long docs;
protected long active;
protected long targetActive;
@@ -162,28 +159,18 @@ public class Coverage {
if (getResultSets() == 0) {
return 0;
}
- long total = useTargetActiveForCoverageComputation ? targetActive : active;
+ long total = targetActive;
if (docs < total) {
return (int) Math.round(docs * 100.0d / total);
}
return getFullResultSets() * 100 / getResultSets();
}
- /**
- * Decides whether active or target active shall be used for coverage computation.
- * DO NOT USE - This is only for temporary internal use.
- */
- @Beta
- public Coverage useTargetActiveForCoverageComputation(boolean value) {
- useTargetActiveForCoverageComputation = value;
- return this;
- }
-
public com.yahoo.container.logging.Coverage toLoggingCoverage() {
int degradation = com.yahoo.container.logging.Coverage.toDegradation(isDegradedByMatchPhase(),
isDegradedByTimeout(),
isDegradedByAdapativeTimeout());
- return new com.yahoo.container.logging.Coverage(getDocs(), getActive(), getTargetActive(), degradation, useTargetActiveForCoverageComputation);
+ return new com.yahoo.container.logging.Coverage(getDocs(), getActive(), getTargetActive(), degradation);
}
}
diff --git a/container-core/src/main/java/com/yahoo/container/logging/Coverage.java b/container-core/src/main/java/com/yahoo/container/logging/Coverage.java
index c016a203256..d4884027c2b 100644
--- a/container-core/src/main/java/com/yahoo/container/logging/Coverage.java
+++ b/container-core/src/main/java/com/yahoo/container/logging/Coverage.java
@@ -9,19 +9,14 @@ public class Coverage {
private final long active;
private final long targetActive;
private final int degradedReason;
- private final boolean useTargetActiveForCoverageComputation;
private final static int DEGRADED_BY_MATCH_PHASE = 1;
private final static int DEGRADED_BY_TIMEOUT = 2;
private final static int DEGRADED_BY_ADAPTIVE_TIMEOUT = 4;
- public Coverage(long docs, long active, long targetActive, int degradedReason, boolean useTargetActiveForCoverageComputation) {
+ public Coverage(long docs, long active, long targetActive, int degradedReason) {
this.docs = docs;
this.active = active;
this.targetActive = targetActive;
this.degradedReason = degradedReason;
- this.useTargetActiveForCoverageComputation = useTargetActiveForCoverageComputation;
- }
- Coverage(long docs, long active, long targetActive, int degradedReason) {
- this(docs, active, targetActive, degradedReason, true);
}
public long getDocs() {
@@ -60,7 +55,7 @@ public class Coverage {
* about had.
*/
public int getResultPercentage() {
- long total = useTargetActiveForCoverageComputation ? targetActive : active;
+ long total = targetActive;
if (docs < total) {
return (int) Math.round(docs * 100.0d / total);
}