Merge pull request #1954 from nosqlbench/mwolters/findmax_fix

fix for findmax early exit bug
This commit is contained in:
Madhavan 2024-05-28 19:43:25 -04:00 committed by GitHub
commit 24a449c951
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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