diff --git a/execution/helm/.gitignore b/execution/helm/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..80bf7fc709ac6d08e703fe9f24d7d5776e26830e --- /dev/null +++ b/execution/helm/.gitignore @@ -0,0 +1 @@ +charts \ No newline at end of file diff --git a/execution/helm/templates/grafana/dashboard-config-map.yaml b/execution/helm/templates/grafana/dashboard-config-map.yaml index 1125d7833cc62e78c049436f38b854d926e2a216..41365e5efefaddc92a9f2f25f867a9d895e4ca3d 100644 --- a/execution/helm/templates/grafana/dashboard-config-map.yaml +++ b/execution/helm/templates/grafana/dashboard-config-map.yaml @@ -253,7 +253,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum by(group, topic) (kafka_consumergroup_group_lag > 0)", + "expr": "sum by(group, topic) (kafka_consumergroup_group_lag >= 0)", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{topic}}", @@ -436,7 +436,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum by(group,topic) (kafka_consumergroup_group_offset > 0)", + "expr": "sum by(group,topic) (kafka_consumergroup_group_offset >= 0)", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{topic}}", @@ -527,7 +527,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "count by(group,topic) (kafka_consumergroup_group_offset > 0)", + "expr": "count by(group,topic) (kafka_consumergroup_group_offset >= 0)", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{topic}}", @@ -892,7 +892,7 @@ data: "steppedLine": false, "targets": [ { - "expr": "sum by(group) (kafka_consumergroup_group_lag > 0)", + "expr": "sum by(group) (kafka_consumergroup_group_lag >= 0)", "format": "time_series", "intervalFactor": 1, "legendFormat": "total lag", diff --git a/execution/helm/templates/theodolite/random-scheduler/cluster-role-binding.yaml b/execution/helm/templates/theodolite/random-scheduler/cluster-role-binding.yaml new file mode 100644 index 0000000000000000000000000000000000000000..658f75c8c5018fe5b9f47cf9619bb4ee5b26b8e5 --- /dev/null +++ b/execution/helm/templates/theodolite/random-scheduler/cluster-role-binding.yaml @@ -0,0 +1,14 @@ +{{- if .Values.randomScheduler.rbac.create -}} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "theodolite.fullname" . }}-random-scheduler +subjects: +- kind: ServiceAccount + name: {{ include "theodolite.fullname" . }}-random-scheduler + namespace: kube-system +roleRef: + kind: ClusterRole + apiGroup: rbac.authorization.k8s.io + name: system:kube-scheduler +{{- end }} diff --git a/execution/helm/templates/theodolite/random-scheduler/deployment.yaml b/execution/helm/templates/theodolite/random-scheduler/deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..35a6ad027b93446a2bb97e2ebd67f2e27652e99a --- /dev/null +++ b/execution/helm/templates/theodolite/random-scheduler/deployment.yaml @@ -0,0 +1,30 @@ +{{- if .Values.randomScheduler.enabled -}} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "theodolite.fullname" . }}-random-scheduler + labels: + app: {{ include "theodolite.fullname" . }} + component: random-scheduler + namespace: kube-system +spec: + replicas: 1 + selector: + matchLabels: + app: {{ include "theodolite.fullname" . }} + component: random-scheduler + template: + metadata: + labels: + app: {{ include "theodolite.fullname" . }} + component: random-scheduler + spec: + serviceAccount: {{ include "theodolite.fullname" . }}-random-scheduler + containers: + - name: random-scheduler + image: ghcr.io/cau-se/theodolite-random-scheduler:theodolite-kotlin-latest + #imagePullPolicy: Always + env: + - name: TARGET_NAMESPACE + value: {{ .Release.Namespace }} +{{- end }} diff --git a/execution/helm/templates/theodolite/random-scheduler/service-account.yaml b/execution/helm/templates/theodolite/random-scheduler/service-account.yaml new file mode 100644 index 0000000000000000000000000000000000000000..babfff17b46d62e7e820fcb9dc8a35d73b4e6538 --- /dev/null +++ b/execution/helm/templates/theodolite/random-scheduler/service-account.yaml @@ -0,0 +1,10 @@ +{{- if .Values.randomScheduler.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + namespace: kube-system + name: {{ include "theodolite.fullname" . }}-random-scheduler + labels: + app: {{ include "theodolite.fullname" . }} + component: random-scheduler +{{- end }} diff --git a/execution/helm/values.yaml b/execution/helm/values.yaml index c257fd1b7053ebe70e0c4e05bd3b199a02441110..5a34ab24fa7b8942fce01dd7b7fd38baab6aa874 100644 --- a/execution/helm/values.yaml +++ b/execution/helm/values.yaml @@ -25,6 +25,11 @@ grafana: adminUser: admin adminPassword: admin grafana.ini: + #org_name: Theodolite + auth.anonymous: + # enable anonymous access + enabled: true + org_role: Admin # Role for unauthenticated users, other valid values are `Viewer`, `Editor` and `Admin` users: default_theme: light ## Sidecars that collect the configmaps with specified label and stores the included files them into the respective folders @@ -249,3 +254,10 @@ serviceAccount: rbac: create: true + +randomScheduler: + enabled: true + rbac: + create: true + serviceAccount: + create: true diff --git a/theodolite-benchmarks/uc1-flink/src/main/java/theodolite/uc1/application/ConfigurationKeys.java b/theodolite-benchmarks/uc1-flink/src/main/java/theodolite/uc1/application/ConfigurationKeys.java index ed961bab733a409dc07b1be7fa35562103c3e2f4..382525cfe75f82dbbe8fbcc85308b0e7788a43bc 100644 --- a/theodolite-benchmarks/uc1-flink/src/main/java/theodolite/uc1/application/ConfigurationKeys.java +++ b/theodolite-benchmarks/uc1-flink/src/main/java/theodolite/uc1/application/ConfigurationKeys.java @@ -19,6 +19,8 @@ public final class ConfigurationKeys { public static final String CHECKPOINTING = "checkpointing"; + public static final String PARALLELISM = "parallelism"; + private ConfigurationKeys() {} } diff --git a/theodolite-benchmarks/uc1-flink/src/main/java/theodolite/uc1/application/HistoryServiceFlinkJob.java b/theodolite-benchmarks/uc1-flink/src/main/java/theodolite/uc1/application/HistoryServiceFlinkJob.java index 6655b52ec3020f46bb8a37c7124ee870fa663573..8d9832e40253fe9e3178bfc25047ed2b376abe76 100644 --- a/theodolite-benchmarks/uc1-flink/src/main/java/theodolite/uc1/application/HistoryServiceFlinkJob.java +++ b/theodolite-benchmarks/uc1-flink/src/main/java/theodolite/uc1/application/HistoryServiceFlinkJob.java @@ -1,6 +1,7 @@ package theodolite.uc1.application; import org.apache.commons.configuration2.Configuration; +import org.apache.flink.api.common.typeinfo.Types; import org.apache.flink.streaming.api.datastream.DataStream; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer; @@ -42,6 +43,14 @@ public final class HistoryServiceFlinkJob { if (checkpointing) { this.env.enableCheckpointing(commitIntervalMs); } + + // Parallelism + final Integer parallelism = this.config.getInteger(ConfigurationKeys.PARALLELISM, null); + if (parallelism != null) { + LOGGER.error("Set parallelism: {}.", parallelism); + this.env.setParallelism(parallelism); + } + } private void buildPipeline() { @@ -61,7 +70,8 @@ public final class HistoryServiceFlinkJob { stream .rebalance() .map(new GsonMapper()) - .flatMap((record, c) -> LOGGER.info("Record: {}", record)); + .flatMap((record, c) -> LOGGER.info("Record: {}", record)) + .returns(Types.GENERIC(Object.class)); // Will never be used } /** diff --git a/theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/ConfigurationKeys.java b/theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/ConfigurationKeys.java index 9ba56c828a0ae5c6147aadd90d449c7cf2324992..e8261062689ce4c586a4e6fbde02878a28f48e97 100644 --- a/theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/ConfigurationKeys.java +++ b/theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/ConfigurationKeys.java @@ -30,6 +30,8 @@ public final class ConfigurationKeys { public static final String CHECKPOINTING = "checkpointing"; + public static final String PARALLELISM = "parallelism"; + private ConfigurationKeys() {} } diff --git a/theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/HistoryServiceFlinkJob.java b/theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/HistoryServiceFlinkJob.java index b8452847df800226ad481f9309323a2a9a532939..1068267086892c4538001b6afc670b3b0cd043ef 100644 --- a/theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/HistoryServiceFlinkJob.java +++ b/theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/HistoryServiceFlinkJob.java @@ -56,6 +56,13 @@ public final class HistoryServiceFlinkJob { this.env.enableCheckpointing(commitIntervalMs); } + // Parallelism + final Integer parallelism = this.config.getInteger(ConfigurationKeys.PARALLELISM, null); + if (parallelism != null) { + LOGGER.error("Set parallelism: {}.", parallelism); + this.env.setParallelism(parallelism); + } + // State Backend final StateBackend stateBackend = StateBackends.fromConfiguration(this.config); this.env.setStateBackend(stateBackend); diff --git a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/ConfigurationKeys.java b/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/ConfigurationKeys.java index a895c74d89c5d788c47b3b78dc70500b4b5a6f5b..bc4e0b9d2d230026e9d2b6df0a11e4fb68380aed 100644 --- a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/ConfigurationKeys.java +++ b/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/ConfigurationKeys.java @@ -34,6 +34,8 @@ public final class ConfigurationKeys { public static final String CHECKPOINTING = "checkpointing"; + public static final String PARALLELISM = "parallelism"; + private ConfigurationKeys() {} } diff --git a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/HistoryServiceFlinkJob.java b/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/HistoryServiceFlinkJob.java index 0f26d37652924a16be1840fd759b3cd5b023f338..d69ee47d8c831f2e5e74abdd8c33393c8ee6e07e 100644 --- a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/HistoryServiceFlinkJob.java +++ b/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/HistoryServiceFlinkJob.java @@ -63,6 +63,13 @@ public final class HistoryServiceFlinkJob { this.env.enableCheckpointing(commitIntervalMs); } + // Parallelism + final Integer parallelism = this.config.getInteger(ConfigurationKeys.PARALLELISM, null); + if (parallelism != null) { + LOGGER.error("Set parallelism: {}.", parallelism); + this.env.setParallelism(parallelism); + } + // State Backend final StateBackend stateBackend = StateBackends.fromConfiguration(this.config); this.env.setStateBackend(stateBackend); diff --git a/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/AggregationServiceFlinkJob.java b/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/AggregationServiceFlinkJob.java index 0db5a3d524f74fbf22304e8f9b44fa55eead321a..45c7ff1ad1faeec6357e4ac3871dec7a51306698 100644 --- a/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/AggregationServiceFlinkJob.java +++ b/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/AggregationServiceFlinkJob.java @@ -76,6 +76,13 @@ public final class AggregationServiceFlinkJob { this.env.enableCheckpointing(commitIntervalMs); } + // Parallelism + final Integer parallelism = this.config.getInteger(ConfigurationKeys.PARALLELISM, null); + if (parallelism != null) { + LOGGER.error("Set parallelism: {}.", parallelism); + this.env.setParallelism(parallelism); + } + // State Backend final StateBackend stateBackend = StateBackends.fromConfiguration(this.config); this.env.setStateBackend(stateBackend); diff --git a/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/ConfigurationKeys.java b/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/ConfigurationKeys.java index 6497f6b055ef115c4a681499c5fa38657bb5d29e..448e8b095ef15c434655ca3c76a9e2de21244054 100644 --- a/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/ConfigurationKeys.java +++ b/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/ConfigurationKeys.java @@ -15,7 +15,7 @@ public final class ConfigurationKeys { public static final String KAFKA_OUTPUT_TOPIC = "kafka.output.topic"; public static final String KAFKA_INPUT_TOPIC = "kafka.input.topic"; - + public static final String SCHEMA_REGISTRY_URL = "schema.registry.url"; public static final String WINDOW_SIZE_MS = "window.size.ms"; @@ -28,13 +28,15 @@ public final class ConfigurationKeys { public static final String FLINK_STATE_BACKEND_PATH = "flink.state.backend.path"; - public static final String FLINK_STATE_BACKEND_MEMORY_SIZE = //NOPMD + public static final String FLINK_STATE_BACKEND_MEMORY_SIZE = // NOPMD "flink.state.backend.memory.size"; public static final String DEBUG = "debug"; public static final String CHECKPOINTING = "checkpointing"; + public static final String PARALLELISM = "parallelism"; + private ConfigurationKeys() {} } diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/Benchmark.kt b/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/Benchmark.kt index 95af36d1b14eb4d664ffd0d3d463df17fd8fb534..05d021b1bcfb77fa8ffeb0522510d49e39ef501c 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/Benchmark.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/Benchmark.kt @@ -22,6 +22,7 @@ interface Benchmark { load: LoadDimension, res: Resource, configurationOverrides: List<ConfigurationOverride?>, - delay: Long + loadGenerationDelay: Long, + afterTeardownDelay: Long ): BenchmarkDeployment } diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/BenchmarkExecution.kt b/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/BenchmarkExecution.kt index 40ab663e179735be61356947df7c37e9edd0a2ea..38d0f0389ce92a8720df05e892d11cf4f1ac480a 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/BenchmarkExecution.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/BenchmarkExecution.kt @@ -48,6 +48,7 @@ class BenchmarkExecution : CustomResource(), Namespaced { var repetitions by Delegates.notNull<Int>() lateinit var restrictions: List<String> var loadGenerationDelay = 0L + var afterTeardownDelay = 5L } /** diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt b/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt index b5316a3df78e7291569ec1d36e561a5445b6f86d..c89e9e85323d6e51c104b1d34ff1ef9d8d4d60cd 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt @@ -71,7 +71,8 @@ class KubernetesBenchmark : Benchmark, CustomResource(), Namespaced { load: LoadDimension, res: Resource, configurationOverrides: List<ConfigurationOverride?>, - loadGenerationDelay: Long + loadGenerationDelay: Long, + afterTeardownDelay: Long ): BenchmarkDeployment { logger.info { "Using $namespace as namespace." } logger.info { "Using $path as resource path." } @@ -100,6 +101,7 @@ class KubernetesBenchmark : Benchmark, CustomResource(), Namespaced { appResources = appResources.map { it.second }, loadGenResources = loadGenResources.map { it.second }, loadGenerationDelay = loadGenerationDelay, + afterTeardownDelay = afterTeardownDelay, kafkaConfig = hashMapOf("bootstrap.servers" to kafkaConfig.bootstrapServer), topics = kafkaConfig.topics, client = DefaultKubernetesClient().inNamespace(namespace) diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/KubernetesBenchmarkDeployment.kt b/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/KubernetesBenchmarkDeployment.kt index 7d1c3f4ba727b8c149e3c5678ad406fa293c8f5b..6cf239676ddb24752f4754a85fc62657f9eb6603 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/KubernetesBenchmarkDeployment.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/KubernetesBenchmarkDeployment.kt @@ -26,6 +26,7 @@ class KubernetesBenchmarkDeployment( val appResources: List<KubernetesResource>, val loadGenResources: List<KubernetesResource>, private val loadGenerationDelay: Long, + private val afterTeardownDelay: Long, private val kafkaConfig: HashMap<String, Any>, private val topics: List<KafkaConfig.TopicWrapper>, private val client: NamespacedKubernetesClient @@ -33,7 +34,6 @@ class KubernetesBenchmarkDeployment( private val kafkaController = TopicManager(this.kafkaConfig) private val kubernetesManager = K8sManager(client) private val LAG_EXPORTER_POD_LABEL = "app.kubernetes.io/name=kafka-lag-exporter" - private val SLEEP_AFTER_TEARDOWN = 5000L /** * Setup a [KubernetesBenchmark] using the [TopicManager] and the [K8sManager]: @@ -61,7 +61,7 @@ class KubernetesBenchmarkDeployment( appResources.forEach { kubernetesManager.remove(it) } kafkaController.removeTopics(this.topics.map { topic -> topic.name }) KafkaLagExporterRemover(client).remove(LAG_EXPORTER_POD_LABEL) - logger.info { "Teardown complete. Wait $SLEEP_AFTER_TEARDOWN ms to let everything come down." } - Thread.sleep(SLEEP_AFTER_TEARDOWN) + logger.info { "Teardown complete. Wait $afterTeardownDelay ms to let everything come down." } + Thread.sleep(Duration.ofSeconds(afterTeardownDelay).toMillis()) } } diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/execution/BenchmarkExecutor.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/BenchmarkExecutor.kt index ecf7c8bff393df717d908d8c556c5700c0151e10..e7b511d8c83b5abccece1204aad2a4a9ecfdfd26 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/execution/BenchmarkExecutor.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/BenchmarkExecutor.kt @@ -28,7 +28,8 @@ abstract class BenchmarkExecutor( val slo: BenchmarkExecution.Slo, val repetitions: Int, val executionId: Int, - val loadGenerationDelay: Long + val loadGenerationDelay: Long, + val afterTeardownDelay: Long ) { var run: AtomicBoolean = AtomicBoolean(true) diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/execution/BenchmarkExecutorImpl.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/BenchmarkExecutorImpl.kt index 912a2b197a45a12a3da8097d0746cdf752172b8f..3afc85f0a8cb67011763498a662b447ce2c07f0f 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/execution/BenchmarkExecutorImpl.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/BenchmarkExecutorImpl.kt @@ -20,13 +20,13 @@ class BenchmarkExecutorImpl( slo: BenchmarkExecution.Slo, repetitions: Int, executionId: Int, - loadGenerationDelay: Long -) : BenchmarkExecutor(benchmark, results, executionDuration, configurationOverrides, slo, repetitions, executionId, loadGenerationDelay) { + loadGenerationDelay: Long, + afterTeardownDelay: Long +) : BenchmarkExecutor(benchmark, results, executionDuration, configurationOverrides, slo, repetitions, executionId, loadGenerationDelay, afterTeardownDelay) { override fun runExperiment(load: LoadDimension, res: Resource): Boolean { var result = false val executionIntervals: MutableList<Pair<Instant, Instant>> = ArrayList() - for (i in 1.rangeTo(repetitions)) { logger.info { "Run repetition $i/$repetitions" } if (this.run.get()) { @@ -51,7 +51,7 @@ class BenchmarkExecutorImpl( } private fun runSingleExperiment(load: LoadDimension, res: Resource): Pair<Instant, Instant> { - val benchmarkDeployment = benchmark.buildDeployment(load, res, this.configurationOverrides, this.loadGenerationDelay) + val benchmarkDeployment = benchmark.buildDeployment(load, res, this.configurationOverrides, this.loadGenerationDelay, this.afterTeardownDelay) val from = Instant.now() try { benchmarkDeployment.setup() diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/execution/Shutdown.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/Shutdown.kt index 80e1ac2341d9f8608d70b39a0d99f7b88dd7f108..0ff8379a0af4b11154214dde021d7c60609631d1 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/execution/Shutdown.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/Shutdown.kt @@ -31,7 +31,8 @@ class Shutdown(private val benchmarkExecution: BenchmarkExecution, private val b load = LoadDimension(0, emptyList()), res = Resource(0, emptyList()), configurationOverrides = benchmarkExecution.configOverrides, - loadGenerationDelay = 0L + loadGenerationDelay = 0L, + afterTeardownDelay = 5L ) deployment.teardown() } catch (e: Exception) { diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt index b166f02367b0bb9c78c902cf61879095d28b0112..ded4943c14ff8250f3dcad5279ff670af5fd7fd3 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt @@ -73,7 +73,8 @@ class TheodoliteExecutor( slo = config.slos[0], repetitions = config.execution.repetitions, executionId = config.executionId, - loadGenerationDelay = config.execution.loadGenerationDelay + loadGenerationDelay = config.execution.loadGenerationDelay, + afterTeardownDelay = config.execution.afterTeardownDelay ) return Config( diff --git a/theodolite-quarkus/src/test/kotlin/theodolite/CompositeStrategyTest.kt b/theodolite-quarkus/src/test/kotlin/theodolite/CompositeStrategyTest.kt index 726d4490b053b5c56f0a0387f54ad557d4c1865c..c2b30ab7eb23d60db39778218ad9d6a4c12799a6 100644 --- a/theodolite-quarkus/src/test/kotlin/theodolite/CompositeStrategyTest.kt +++ b/theodolite-quarkus/src/test/kotlin/theodolite/CompositeStrategyTest.kt @@ -31,7 +31,7 @@ class CompositeStrategyTest { val results = Results() val benchmark = TestBenchmark() val sloChecker: BenchmarkExecution.Slo = BenchmarkExecution.Slo() - val benchmarkExecutor = TestBenchmarkExecutorImpl(mockResults, benchmark, results, sloChecker, 0, 0) + val benchmarkExecutor = TestBenchmarkExecutorImpl(mockResults, benchmark, results, sloChecker, 0, 0, 5) val linearSearch = LinearSearch(benchmarkExecutor) val lowerBoundRestriction = LowerBoundRestriction(results) val strategy = @@ -65,7 +65,7 @@ class CompositeStrategyTest { val benchmark = TestBenchmark() val sloChecker: BenchmarkExecution.Slo = BenchmarkExecution.Slo() val benchmarkExecutorImpl = - TestBenchmarkExecutorImpl(mockResults, benchmark, results, sloChecker, 0, 0) + TestBenchmarkExecutorImpl(mockResults, benchmark, results, sloChecker, 0, 0, 0) val binarySearch = BinarySearch(benchmarkExecutorImpl) val lowerBoundRestriction = LowerBoundRestriction(results) val strategy = @@ -98,7 +98,7 @@ class CompositeStrategyTest { val results = Results() val benchmark = TestBenchmark() val sloChecker: BenchmarkExecution.Slo = BenchmarkExecution.Slo() - val benchmarkExecutor = TestBenchmarkExecutorImpl(mockResults, benchmark, results, sloChecker, 0, 0) + val benchmarkExecutor = TestBenchmarkExecutorImpl(mockResults, benchmark, results, sloChecker, 0, 0,0) val binarySearch = BinarySearch(benchmarkExecutor) val lowerBoundRestriction = LowerBoundRestriction(results) val strategy = diff --git a/theodolite-quarkus/src/test/kotlin/theodolite/TestBenchmark.kt b/theodolite-quarkus/src/test/kotlin/theodolite/TestBenchmark.kt index 71e3cbcc78208cc4227e369d59d841e39adb87ed..6ddca296acced658609fcccb307a83047238e118 100644 --- a/theodolite-quarkus/src/test/kotlin/theodolite/TestBenchmark.kt +++ b/theodolite-quarkus/src/test/kotlin/theodolite/TestBenchmark.kt @@ -12,7 +12,8 @@ class TestBenchmark : Benchmark { load: LoadDimension, res: Resource, configurationOverrides: List<ConfigurationOverride?>, - loadGenerationDelay: Long + loadGenerationDelay: Long, + afterTeardownDelay: Long ): BenchmarkDeployment { return TestBenchmarkDeployment() } diff --git a/theodolite-quarkus/src/test/kotlin/theodolite/TestBenchmarkExecutorImpl.kt b/theodolite-quarkus/src/test/kotlin/theodolite/TestBenchmarkExecutorImpl.kt index 200404614f9935c47147a5ff79789285ad1b8250..cbd2d5926d61b0bfd4de6fab0c14422ddf88f190 100644 --- a/theodolite-quarkus/src/test/kotlin/theodolite/TestBenchmarkExecutorImpl.kt +++ b/theodolite-quarkus/src/test/kotlin/theodolite/TestBenchmarkExecutorImpl.kt @@ -14,7 +14,8 @@ class TestBenchmarkExecutorImpl( results: Results, slo: BenchmarkExecution.Slo, executionId: Int, - loadGenerationDelay: Long + loadGenerationDelay: Long, + afterTeardownDelay: Long ) : BenchmarkExecutor( benchmark, @@ -24,7 +25,8 @@ class TestBenchmarkExecutorImpl( slo = slo, repetitions = 1, executionId = executionId, - loadGenerationDelay = loadGenerationDelay + loadGenerationDelay = loadGenerationDelay, + afterTeardownDelay = afterTeardownDelay ) { override fun runExperiment(load: LoadDimension, res: Resource): Boolean {