getJournal() {
+ return journal;
+ }
}
diff --git a/nbr/src/main/java/io/nosqlbench/scenarios/simframe/planning/SimFrameAction.java b/nbr/src/main/java/io/nosqlbench/scenarios/simframe/planning/SimFrameAction.java
new file mode 100644
index 000000000..e435f11b3
--- /dev/null
+++ b/nbr/src/main/java/io/nosqlbench/scenarios/simframe/planning/SimFrameAction.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2020-2024 nosqlbench
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package io.nosqlbench.scenarios.simframe.planning;
+
+public enum SimFrameAction {
+ continue_run,
+ stop_run
+}
diff --git a/nbr/src/main/java/io/nosqlbench/scenarios/simframe/planning/SimFrameFunction.java b/nbr/src/main/java/io/nosqlbench/scenarios/simframe/planning/SimFrameFunction.java
index 77d08459f..7b629d660 100644
--- a/nbr/src/main/java/io/nosqlbench/scenarios/simframe/planning/SimFrameFunction.java
+++ b/nbr/src/main/java/io/nosqlbench/scenarios/simframe/planning/SimFrameFunction.java
@@ -16,10 +16,13 @@
package io.nosqlbench.scenarios.simframe.planning;
+import io.nosqlbench.engine.core.lifecycle.scenario.container.InvokableResult;
+import io.nosqlbench.scenarios.simframe.capture.SimFrameJournal;
import org.apache.commons.math4.legacy.analysis.MultivariateFunction;
-public interface SimFrameFunction extends MultivariateFunction {
+public interface SimFrameFunction extends MultivariateFunction {
@Override
double value(double[] point);
+ SimFrameJournal
getJournal();
}
diff --git a/nbr/src/main/java/io/nosqlbench/scenarios/simframe/planning/SimFrameFunctionAnalyzer.java b/nbr/src/main/java/io/nosqlbench/scenarios/simframe/planning/SimFrameFunctionAnalyzer.java
new file mode 100644
index 000000000..746b2906c
--- /dev/null
+++ b/nbr/src/main/java/io/nosqlbench/scenarios/simframe/planning/SimFrameFunctionAnalyzer.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2020-2024 nosqlbench
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package io.nosqlbench.scenarios.simframe.planning;
+
+import io.nosqlbench.engine.core.lifecycle.scenario.container.InvokableResult;
+
+public abstract class SimFrameFunctionAnalyzer, C extends Record> {
+ protected final A function;
+ protected C config;
+
+ protected SimFrameFunctionAnalyzer(A function, C config) {
+ this.function = function;
+ this.config = config;
+ }
+
+ public record FrameResult(double value, SimFrameAction action) {}
+
+ public SimFrame extends InvokableResult> analyze() {
+ FrameResult result = initialFrame();
+ while (result.action() == SimFrameAction.continue_run) {
+ result = nextFrame();
+ }
+ return function.getJournal().bestRun();
+ }
+
+ protected abstract FrameResult nextFrame();
+ protected abstract FrameResult initialFrame();
+}
diff --git a/pom.xml b/pom.xml
index ddd9ff36e..bdda03576 100644
--- a/pom.xml
+++ b/pom.xml
@@ -59,20 +59,23 @@
adapter-diag
adapter-stdout
- adapter-pinecone
- adapter-dynamodb
+ adapter-cqld4
adapter-http
adapter-tcp
+ adapter-dynamodb
+ adapter-mongodb
adapter-pulsar
+ adapter-s4j
adapter-kafka
adapter-amqp
adapter-jdbc
+
adapter-milvus
adapter-mongodb
adapter-neo4j
adapter-aws-opensearch
- adapter-cqld4
- adapter-s4j
+
+
virtdata-api
@@ -91,6 +94,151 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/virtdata-api/src/main/java/io/nosqlbench/engine/api/templating/ParsedTemplateMap.java b/virtdata-api/src/main/java/io/nosqlbench/engine/api/templating/ParsedTemplateMap.java
index b71cd8316..5370ac8fb 100644
--- a/virtdata-api/src/main/java/io/nosqlbench/engine/api/templating/ParsedTemplateMap.java
+++ b/virtdata-api/src/main/java/io/nosqlbench/engine/api/templating/ParsedTemplateMap.java
@@ -1134,5 +1134,11 @@ public class ParsedTemplateMap implements LongFunction