Add Early Termination to runBenchmark on Benchmark Failure (#5267)

This commit is contained in:
hunteraraujo
2023-09-19 20:24:52 -07:00
committed by GitHub
parent a37b486227
commit 80682b41cb

View File

@@ -202,6 +202,13 @@ class SkillTreeViewModel extends ChangeNotifier {
(element) => element.keys.first.id == node.id,
);
nodeStatus[node] = successStatus;
// If successStatus is false, break out of the loop
if (!successStatus) {
print(
"Benchmark for node ${node.id} failed. Stopping all benchmarks.");
break;
}
}
} catch (e) {
print("Error while running benchmark: $e");