diff --git a/theodolite-quarkus/config/example-benchmark-yaml-resource.yaml b/theodolite-quarkus/config/example-benchmark-yaml-resource.yaml index ebc2fe9e44fe303e342cabee301cb63664867cfb..cdc2122d9e6b568f1a75b0d55eff8a0af6450983 100644 --- a/theodolite-quarkus/config/example-benchmark-yaml-resource.yaml +++ b/theodolite-quarkus/config/example-benchmark-yaml-resource.yaml @@ -22,7 +22,7 @@ loadTypes: - type: "NumSensorsLoadGeneratorReplicaPatcher" resource: "uc1-load-generator-deployment.yaml" kafkaConfig: - bootstrapServer: "theodolite-cp-kafka:9092" + bootstrapServer: "localhost:31290" topics: - name: "input" numPartitions: 40 diff --git a/theodolite-quarkus/config/example-execution-yaml-resource.yaml b/theodolite-quarkus/config/example-execution-yaml-resource.yaml index ccb2442d3534058d2f85bf7c6e5551818acaa422..e0b327a022099410fea8028fb5d37fee5672a857 100644 --- a/theodolite-quarkus/config/example-execution-yaml-resource.yaml +++ b/theodolite-quarkus/config/example-execution-yaml-resource.yaml @@ -17,7 +17,7 @@ execution: strategy: "LinearSearch" duration: 300 # in seconds repetitions: 1 - delay: 30 # in seconds + loadGenerationDelay: 30 # in seconds, optional field, default is 0 seconds restrictions: - "LowerBound" configOverrides: [] diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/BenchmarkExecution.kt b/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/BenchmarkExecution.kt index f3eeaeba120237145dae1927ef212e8d21b94f50..40ab663e179735be61356947df7c37e9edd0a2ea 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/BenchmarkExecution.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/BenchmarkExecution.kt @@ -47,7 +47,7 @@ class BenchmarkExecution : CustomResource(), Namespaced { var duration by Delegates.notNull<Long>() var repetitions by Delegates.notNull<Int>() lateinit var restrictions: List<String> - var delay by Delegates.notNull<Long>() + var loadGenerationDelay = 0L } /** diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt b/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt index 11cf09066864dd58f41d6edd8f2f41dd55012a42..b5316a3df78e7291569ec1d36e561a5445b6f86d 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt @@ -71,7 +71,7 @@ class KubernetesBenchmark : Benchmark, CustomResource(), Namespaced { load: LoadDimension, res: Resource, configurationOverrides: List<ConfigurationOverride?>, - delay: Long + loadGenerationDelay: Long ): BenchmarkDeployment { logger.info { "Using $namespace as namespace." } logger.info { "Using $path as resource path." } @@ -99,7 +99,7 @@ class KubernetesBenchmark : Benchmark, CustomResource(), Namespaced { namespace = namespace, appResources = appResources.map { it.second }, loadGenResources = loadGenResources.map { it.second }, - delay = delay, + loadGenerationDelay = loadGenerationDelay, 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 82e8adeb1a68a4e41a11cf5f8d75276f150282b3..3d082a13c7482095ad217a97c54dd39d33aa6b1b 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/KubernetesBenchmarkDeployment.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/KubernetesBenchmarkDeployment.kt @@ -25,7 +25,7 @@ class KubernetesBenchmarkDeployment( val namespace: String, val appResources: List<KubernetesResource>, val loadGenResources: List<KubernetesResource>, - private val delay: Long, + private val loadGenerationDelay: Long, private val kafkaConfig: HashMap<String, Any>, private val topics: List<KafkaConfig.TopicWrapper>, private val client: NamespacedKubernetesClient @@ -45,8 +45,8 @@ class KubernetesBenchmarkDeployment( .map { NewTopic(it.name, it.numPartitions, it.replicationFactor) } kafkaController.createTopics(kafkaTopics) appResources.forEach { kubernetesManager.deploy(it) } - logger.info { "Wait ${this.delay} seconds before starting the workload generator." } - Thread.sleep(Duration.ofSeconds(this.delay).toMillis()) + logger.info { "Wait ${this.loadGenerationDelay} seconds before starting the workload generator." } + Thread.sleep(Duration.ofSeconds(this.loadGenerationDelay).toMillis()) loadGenResources.forEach { kubernetesManager.deploy(it) } } diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/execution/BenchmarkExecutor.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/BenchmarkExecutor.kt index 3d362e437538211103e74fee1652877d1df7e4f1..909ae77a95dfef7dfc1dafd7bd0a326a72ef1424 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/execution/BenchmarkExecutor.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/BenchmarkExecutor.kt @@ -27,7 +27,7 @@ abstract class BenchmarkExecutor( val configurationOverrides: List<ConfigurationOverride?>, val slo: BenchmarkExecution.Slo, val executionId: Int, - val delay: Long + val loadGenerationDelay: 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 c70ab20379e1377d47c5513a6df5f2bf5d1b320d..22db5076bee51e03318aa9ac95e66c2d61d27f28 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/execution/BenchmarkExecutorImpl.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/BenchmarkExecutorImpl.kt @@ -21,11 +21,11 @@ class BenchmarkExecutorImpl( configurationOverrides: List<ConfigurationOverride?>, slo: BenchmarkExecution.Slo, executionId: Int, - delay: Long -) : BenchmarkExecutor(benchmark, results, executionDuration, configurationOverrides, slo, executionId, delay) { + loadGenerationDelay: Long +) : BenchmarkExecutor(benchmark, results, executionDuration, configurationOverrides, slo, executionId, loadGenerationDelay) { override fun runExperiment(load: LoadDimension, res: Resource): Boolean { var result = false - val benchmarkDeployment = benchmark.buildDeployment(load, res, configurationOverrides, delay) + val benchmarkDeployment = benchmark.buildDeployment(load, res, configurationOverrides, loadGenerationDelay) 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 c74824a4d5f081541a75ad25d27845f0af6a4ef7..80e1ac2341d9f8608d70b39a0d99f7b88dd7f108 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/execution/Shutdown.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/Shutdown.kt @@ -31,7 +31,7 @@ class Shutdown(private val benchmarkExecution: BenchmarkExecution, private val b load = LoadDimension(0, emptyList()), res = Resource(0, emptyList()), configurationOverrides = benchmarkExecution.configOverrides, - delay = 0L + loadGenerationDelay = 0L ) 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 00c768b2c21f75c1078e8d85f81037fcb7e6480e..c297251e30c17e5824c2541365164d9824718073 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt @@ -72,7 +72,7 @@ class TheodoliteExecutor( configurationOverrides = config.configOverrides, slo = config.slos[0], executionId = config.executionId, - delay = config.execution.delay + loadGenerationDelay = config.execution.loadGenerationDelay ) return Config(