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:
Maxime Guerreiro
2018-03-06 14:09:03 +01:00
parent deaff4a337
commit 74b08b2090
2 changed files with 0 additions and 14 deletions

View File

@@ -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;
}

View File

@@ -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;