Remove the Prolog reductions counter
This commit removes the prologReductionCount value from the REST API. This is a non retro-compatible change, but this field is not likely to be used often, except to debug rules.pl rules (thus, used by humans and not by automated systems). This field could already be null, so clients using it should already handle this. Change-Id: Id4b8431a759110efcd40774ec2a6996a97680cea
This commit is contained in:
@@ -97,7 +97,6 @@ public class SubmitRuleEvaluator {
|
||||
private SubmitRuleOptions opts;
|
||||
private Change change;
|
||||
private boolean logErrors = true;
|
||||
private long reductionsConsumed;
|
||||
private ProjectState projectState;
|
||||
|
||||
private Term submitRule;
|
||||
@@ -178,11 +177,6 @@ public class SubmitRuleEvaluator {
|
||||
return this;
|
||||
}
|
||||
|
||||
/** @return Prolog reductions consumed during evaluation. */
|
||||
public long getReductionsConsumed() {
|
||||
return reductionsConsumed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluate the submit rules.
|
||||
*
|
||||
@@ -461,8 +455,6 @@ public class SubmitRuleEvaluator {
|
||||
String.format(
|
||||
"Exception calling %s on change %d of %s", sr, cd.getId().get(), getProjectName()),
|
||||
err);
|
||||
} finally {
|
||||
reductionsConsumed = env.getReductions();
|
||||
}
|
||||
|
||||
Term resultsTerm = toListTerm(results);
|
||||
@@ -547,8 +539,6 @@ public class SubmitRuleEvaluator {
|
||||
"Exception calling %s on change %d of %s",
|
||||
filterRule, cd.getId().get(), parentState.getName()),
|
||||
err);
|
||||
} finally {
|
||||
reductionsConsumed += env.getReductions();
|
||||
}
|
||||
childEnv = parentEnv;
|
||||
}
|
||||
|
||||
@@ -84,9 +84,6 @@ public class TestSubmitRule implements RestModifyView<RevisionResource, TestSubm
|
||||
for (SubmitRecord r : records) {
|
||||
out.add(new Record(r, accounts));
|
||||
}
|
||||
if (!out.isEmpty()) {
|
||||
out.get(0).prologReductionCount = evaluator.getReductionsConsumed();
|
||||
}
|
||||
accounts.fill();
|
||||
return out;
|
||||
}
|
||||
@@ -99,7 +96,6 @@ public class TestSubmitRule implements RestModifyView<RevisionResource, TestSubm
|
||||
Map<String, None> need;
|
||||
Map<String, AccountInfo> may;
|
||||
Map<String, None> impossible;
|
||||
Long prologReductionCount;
|
||||
|
||||
Record(SubmitRecord r, AccountLoader accounts) {
|
||||
this.status = r.status;
|
||||
|
||||
Reference in New Issue
Block a user