Skip to content

Commit f8d821f

Browse files
committed
Fix multiround benchmarking bug: successful completion did not stop execution
1 parent ea8c94c commit f8d821f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/benchmark/framework/benchmarkingCore/executeBenchmarkingTask.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ export async function executeBenchmarkingTask(
130130
proofsChecker,
131131
abortSignal
132132
);
133-
Logging.logRoundResult(result, itemLogger);
134133
return result;
135134
}
136135

@@ -156,17 +155,20 @@ export async function executeBenchmarkingTask(
156155
roundNumber
157156
);
158157
nextGeneratedProofId += childRoundResult.generatedProofs.length;
158+
159159
if (parentProof === undefined) {
160-
// roundIndex === 0
161160
rootResult = childRoundResult;
162161
} else {
162+
// link target proof and the result of its proof-fix generation
163163
parentProof.benchmarkedProof.linkNextRoundResult(
164164
childRoundResult
165165
);
166166
childRoundResult.linkParentProofToFix(
167167
parentProof.benchmarkedProof
168168
);
169169
}
170+
171+
Logging.logRoundResult(childRoundResult, itemLogger);
170172
ArtifactsUtils.saveRoundResultToFileOrThrow(
171173
childRoundResult,
172174
joinPaths(
@@ -178,7 +180,10 @@ export async function executeBenchmarkingTask(
178180
)
179181
);
180182

181-
if (childRoundResult.isFailedToFinishRound()) {
183+
if (
184+
childRoundResult.isFailedToFinishRound() ||
185+
childRoundResult.isSuccessfulCompletion()
186+
) {
182187
/**
183188
* There are different policies of what to do when one of the proof-fixing rounds has failed,
184189
* but here the following is chosen: to return the benchmarking result "generally" failed to finish

0 commit comments

Comments
 (0)