From 118b6d16db12b45fc3a7de722eb3b813fd91a813 Mon Sep 17 00:00:00 2001 From: Mark Wolters Date: Tue, 28 May 2024 17:00:29 -0400 Subject: [PATCH] fix for findmax early exit bug --- .../java/io/nosqlbench/scenarios/simframe/SimFrameUtils.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nbr/src/main/java/io/nosqlbench/scenarios/simframe/SimFrameUtils.java b/nbr/src/main/java/io/nosqlbench/scenarios/simframe/SimFrameUtils.java index 388e78c4d..a33d9c9be 100644 --- a/nbr/src/main/java/io/nosqlbench/scenarios/simframe/SimFrameUtils.java +++ b/nbr/src/main/java/io/nosqlbench/scenarios/simframe/SimFrameUtils.java @@ -27,6 +27,7 @@ import java.util.Optional; import java.util.concurrent.locks.LockSupport; public class SimFrameUtils { + public static final String SIM_CYCLES = "sim_cycles"; public static void awaitActivity(Activity flywheel) { // await flywheel actually spinning, or timeout with error @@ -54,6 +55,8 @@ public class SimFrameUtils { // Start the flywheel at an "idle" speed, even if the user hasn't set it flywheel.onEvent(new ParamChange<>(new CycleRateSpec(100.0d, 1.1d, SimRateSpec.Verb.restart))); flywheel.getActivityDef().setEndCycle(Long.MAX_VALUE); + flywheel.getActivityDef().getParams().set(SIM_CYCLES, Long.MAX_VALUE); + return flywheel; } }