diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/execution/KafkaBenchmarkExecutor.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/KafkaBenchmarkExecutor.kt index 5b95685367c0a2471f6b7264bc66ec37cdd9cd29..d7b8addb2e99772acad02e51a1f5ccaf5645ab81 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/execution/KafkaBenchmarkExecutor.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/KafkaBenchmarkExecutor.kt @@ -13,7 +13,7 @@ class KafkaBenchmarkExecutor(benchmark: Benchmark, results: Results, executionDu override fun runExperiment(load: LoadDimension, res: Resource): Boolean { benchmark.start(load, res) this.waitAndLog() - benchmark.stop() + benchmark.clearClusterEnvironment() // todo evaluate val result = false // if success else false this.results.setResult(Pair(load, res), result) diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/execution/TestBenchmarkExecutor.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/TestBenchmarkExecutor.kt index 5bcfa5e77ce78edf5af5478d6c1e4bb065b5e5f7..c5c2baf07a0227070b72ec8eb86b9af0534b15a7 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/execution/TestBenchmarkExecutor.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/TestBenchmarkExecutor.kt @@ -1,5 +1,6 @@ package theodolite.execution +import mu.KotlinLogging import theodolite.execution.BenchmarkExecutor import theodolite.util.Benchmark import theodolite.util.LoadDimension @@ -13,8 +14,6 @@ class TestBenchmarkExecutor(private val mockResults: Array<Array<Boolean>>, benc override fun runExperiment(load: LoadDimension, res: Resource): Boolean { val result = this.mockResults[load.get()][res.get()] - System.out.println("load :" + load.get().toString() + ", res: " + res.get().toString() + ", res: " + result) - this.results.setResult(Pair(load, res), result) return result; } diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt index 3ca0840c4cb9248147133c137a31a72baf053b3c..2abfd8ce8b012a6f9738b4c384cc5cff33382509 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt @@ -1,16 +1,34 @@ package theodolite.execution +import mu.KotlinLogging +import theodolite.k8s.UC1Benchmark import theodolite.strategies.restriction.LowerBoundRestriction import theodolite.strategies.searchstrategy.CompositeStrategy import theodolite.strategies.searchstrategy.LinearSearch import theodolite.util.* import java.time.Duration +private val logger = KotlinLogging.logger {} + class TheodoliteExecutor() { private fun loadConfig(): Config { - val benchmark: KafkaBenchmark = KafkaBenchmark(emptyMap()) + val benchmark: UC1Benchmark = UC1Benchmark( + UC1Benchmark.UC1BenchmarkConfig( + zookeeperConnectionString = "my-confluent-cp-zookeeper:2181", + kafkaIPConnectionString = "my-confluent-cp-kafka:9092", + schemaRegistryConnectionString = "http://my-confluent-cp-schema-registry:8081", + kafkaPartition = 40, + kafkaReplication = 3, + kafkaTopics = listOf("input", "output"), + // TODO("handle path in a more nice way (not absolut)") + ucDeploymentPath = "src/main/resources/yaml/aggregation-deployment.yaml", + ucServicePath = "src/main/resources/yaml/aggregation-service.yaml", + wgDeploymentPath = "src/main/resources/yaml/workloadGenerator.yaml", + ucImageURL = "ghcr.io/cau-se/theodolite-uc1-kstreams-app:latest", + wgImageURL = "ghcr.io/cau-se/theodolite-uc1-kstreams-workload-generator:latest" + )) val results: Results = Results() - val executionDuration = Duration.ofSeconds(60*5 ) + val executionDuration = Duration.ofSeconds(60*5) val executor: BenchmarkExecutor = KafkaBenchmarkExecutor(benchmark, results, executionDuration) val restrictionStrategy = LowerBoundRestriction(results) @@ -30,7 +48,7 @@ class TheodoliteExecutor() { // execute benchmarks for each load for(load in config.loads) { - config.compositeStrategy.findSuitableResources(load, config.resources) + config.compositeStrategy.findSuitableResource(load, config.resources) } } diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/k8s/TopicManager.kt b/theodolite-quarkus/src/main/kotlin/theodolite/k8s/TopicManager.kt index 23954d19831e022a2590c5493509e9b4d688ca93..0b643ac101aa82c21559e123d221ba1ac750bdf5 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/k8s/TopicManager.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/k8s/TopicManager.kt @@ -1,10 +1,13 @@ package theodolite.k8s +import mu.KotlinLogging import org.apache.kafka.clients.admin.AdminClient import org.apache.kafka.clients.admin.AdminClientConfig import org.apache.kafka.clients.admin.ListTopicsResult import org.apache.kafka.clients.admin.NewTopic +private val logger = KotlinLogging.logger {} + class TopicManager(boostrapIp: String) { val props = hashMapOf<String, Any>(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG to boostrapIp) lateinit var kafkaAdmin: AdminClient @@ -13,7 +16,7 @@ class TopicManager(boostrapIp: String) { try { kafkaAdmin = AdminClient.create(props) } catch (e: Exception) { - System.out.println(e.toString()) + logger.error {e.toString()} } } @@ -25,7 +28,7 @@ class TopicManager(boostrapIp: String) { newTopics.add(tops) } kafkaAdmin.createTopics(newTopics) - System.out.println("Topics created") + logger.info {"Topics created"} } fun createTopics(topics: List<String>, numPartitions: Int, replicationfactor: Short) { @@ -36,7 +39,7 @@ class TopicManager(boostrapIp: String) { newTopics.add(tops) } kafkaAdmin.createTopics(newTopics) - System.out.println("Creation of $topics started") + logger.info {"Creation of $topics started"} } fun deleteTopics(topics: List<String>) { @@ -46,9 +49,9 @@ class TopicManager(boostrapIp: String) { try { result.all().get() } catch (ex: Exception) { - System.out.println(ex.toString()) + logger.error {ex.toString()} } - System.out.println("Topics deleted") + logger.info {"Topics deleted"} } fun getTopics(): ListTopicsResult? { diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/k8s/UC1Benchmark.kt b/theodolite-quarkus/src/main/kotlin/theodolite/k8s/UC1Benchmark.kt index dbe956d264b6e458120322d85db4be045e78bbfd..128fefd2a27010f444dfaf01399d3dadadfa3e51 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/k8s/UC1Benchmark.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/k8s/UC1Benchmark.kt @@ -3,14 +3,10 @@ package theodolite.k8s import io.fabric8.kubernetes.api.model.Service import io.fabric8.kubernetes.api.model.apps.Deployment import io.fabric8.kubernetes.client.DefaultKubernetesClient -import io.fabric8.kubernetes.client.KubernetesClient import io.fabric8.kubernetes.client.NamespacedKubernetesClient -import org.apache.kafka.common.internals.Topic import theodolite.util.Benchmark import theodolite.util.LoadDimension import theodolite.util.Resource -import theodolite.k8s.WorkloadGeneratorStateCleaner -import java.io.FileNotFoundException class UC1Benchmark(config: UC1BenchmarkConfig) : Benchmark(config) { val workloadGeneratorStateCleaner: WorkloadGeneratorStateCleaner @@ -31,49 +27,52 @@ class UC1Benchmark(config: UC1BenchmarkConfig) : Benchmark(config) { this.yamlLoader = YamlLoader(this.kubernetesClient) this.deploymentManager = DeploymentManager(this.kubernetesClient) this.serviceManager = ServiceManager(this.kubernetesClient) - ucDeployment = this.yamlLoader.loadDeployment(this.config.ucDeploymentPath)!! - ucService = this.yamlLoader.loadService(this.config.ucServicePath)!! - - + ucDeployment = this.yamlLoader.loadDeployment(this.config.ucDeploymentPath) + ucService = this.yamlLoader.loadService(this.config.ucServicePath) + } + override fun clearClusterEnvironment() { + this.workloadGeneratorStateCleaner.deleteAll() + this.topicManager.deleteTopics(this.config.kafkaTopics) + this.deploymentManager.delete(this.ucDeployment) + this.serviceManager.delete(this.ucService) } - override fun start(load: LoadDimension, resources: Resource) { - // TODO("extract code to dedicated functions. And, we should create a abstration layer to create the benchmark core, which are identically by all benchmarks") + override fun initializeClusterEnvironment() { this.workloadGeneratorStateCleaner.deleteAll() this.topicManager.deleteTopics(this.config.kafkaTopics) this.topicManager.createTopics(this.config.kafkaTopics, this.config.kafkaPartition, this.config.kafkaReplication) + } + + override fun startSUT(resources: Resource) { + this.deploymentManager.setImageName(ucDeployment, "uc-application", this.config.ucImageURL) // set environment variables val environmentVariables: MutableMap<String, String> = mutableMapOf() environmentVariables.put("KAFKA_BOOTSTRAP_SERVER", this.config.kafkaIPConnectionString) - // environmentVariables.put("replicas", this.config.deploymentReplicas) TODO("add possibility to set replicas") - environmentVariables.put("SCHEMA_REGISTRY_URL", this.config.schemaRegistryConnectionString) + environmentVariables.put("SCHEMA_REGISTRY_URL", this.config.schemaRegistryConnectionString) + + + // setup deployment + this.deploymentManager.setReplica(ucDeployment, resources.get()) this.deploymentManager.setWorkloadEnv(ucDeployment,"uc-application", environmentVariables) // create kubernetes resources this.deploymentManager.deploy(ucDeployment) this.serviceManager.deploy(ucService) - - this.startWorkloadGenerator("uc1", load, "uc1") - } - override fun stop() { - this.workloadGeneratorStateCleaner.deleteAll() - this.topicManager.deleteTopics(this.config.kafkaTopics) - this.deploymentManager.delete(this.ucDeployment) - this.serviceManager.delete(this.ucService) - } - - override fun startWorkloadGenerator(wg: String, load: LoadDimension, ucId: String) { + override fun startWorkloadGenerator(load: LoadDimension) { + this.deploymentManager.setImageName(ucDeployment, "workload-generator", this.config.wgImageURL) val wgDeployment = this.yamlLoader.loadDeployment(this.config.wgDeploymentPath) - val environmentVariables: MutableMap<String, String> = mutableMapOf() - environmentVariables.put("NUM_SENSORS", load.get().toString()) + // TODO ("calculate number of required instances") val requiredInstances: Int = 1 + val environmentVariables: MutableMap<String, String> = mutableMapOf() + environmentVariables.put("NUM_SENSORS", load.get().toString()) environmentVariables.put("NUM_INSTANCES", requiredInstances.toString()) - wgDeployment?.let { this.deploymentManager.setWorkloadEnv(it, "workload-generator", environmentVariables) } + + this.deploymentManager.setWorkloadEnv(wgDeployment, "workload-generator", environmentVariables) } data class UC1BenchmarkConfig( @@ -84,8 +83,9 @@ class UC1Benchmark(config: UC1BenchmarkConfig) : Benchmark(config) { val kafkaReplication: Short, val kafkaPartition: Int, val ucDeploymentPath: String, - val ucDeploymentReplicas: String, val ucServicePath: String, - val wgDeploymentPath: String + val wgDeploymentPath: String, + val ucImageURL: String, + val wgImageURL: String ) {} } \ No newline at end of file diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/k8s/WorkloadGeneratorStateCleaner.kt b/theodolite-quarkus/src/main/kotlin/theodolite/k8s/WorkloadGeneratorStateCleaner.kt index ec94e32c4dbfd0015dfc5f48ca811c7ea8ce0f10..fdc953116f4032ba41e75af6ba1e8a1082ddb212 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/k8s/WorkloadGeneratorStateCleaner.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/k8s/WorkloadGeneratorStateCleaner.kt @@ -1,10 +1,14 @@ package theodolite.k8s +import mu.KotlinLogging import org.apache.zookeeper.KeeperException import org.apache.zookeeper.WatchedEvent import org.apache.zookeeper.Watcher import org.apache.zookeeper.ZooKeeper +private val logger = KotlinLogging.logger {} + + class WorkloadGeneratorStateCleaner(ip: String) { val path = "/workload-generation" val sessionTimeout = 60 @@ -16,7 +20,7 @@ class WorkloadGeneratorStateCleaner(ip: String) { val watcher: Watcher = ZookeperWatcher() // defined below zookeeperClient = ZooKeeper(ip, sessionTimeout, watcher) } catch (e: Exception) { - System.out.println(e.toString()) + logger.error {e.toString()} } } @@ -28,7 +32,7 @@ class WorkloadGeneratorStateCleaner(ip: String) { try { zookeeperClient.delete(path, -1) } catch (ex: Exception) { - System.out.println(ex.toString()) + logger.error {ex.toString()} } try { @@ -42,15 +46,15 @@ class WorkloadGeneratorStateCleaner(ip: String) { deleted = true } is InterruptedException -> { - System.out.println(ex.toString()) + logger.error {ex.toString()} } } } Thread.sleep(retryTime) - System.out.println("ZooKeeper reset was not successful. Retrying in 5s") + logger.info {"ZooKeeper reset was not successful. Retrying in 5s"} } - System.out.println("ZooKeeper reset was successful") + logger.info {"ZooKeeper reset was successful"} } private class ZookeperWatcher : Watcher { diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/strategies/restriction/RestrictionStrategy.kt b/theodolite-quarkus/src/main/kotlin/theodolite/strategies/restriction/RestrictionStrategy.kt index 60a6eccfb37e5941455f3fc33876092a2317276a..5bef38aaf3e5ff446a839703e425f9dd3c5e22d8 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/strategies/restriction/RestrictionStrategy.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/strategies/restriction/RestrictionStrategy.kt @@ -5,5 +5,5 @@ import theodolite.util.LoadDimension import theodolite.util.Resource abstract class RestrictionStrategy(val results: Results) { - public abstract fun next(load: LoadDimension, resources: List<Resource>): List<Resource>; + public abstract fun next(load: LoadDimension, resources: List<Resource>): List<Resource> } \ No newline at end of file diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/strategies/searchstrategy/BinarySearch.kt b/theodolite-quarkus/src/main/kotlin/theodolite/strategies/searchstrategy/BinarySearch.kt index a1e1c8f3f112519fa46ccbe139e07ba7a591223b..3c6fc2eee9a9bde99682633d0922d9a06629875f 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/strategies/searchstrategy/BinarySearch.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/strategies/searchstrategy/BinarySearch.kt @@ -7,7 +7,7 @@ import theodolite.util.Results import java.lang.IllegalArgumentException class BinarySearch(benchmarkExecutor: BenchmarkExecutor, results: Results) : SearchStrategy(benchmarkExecutor, results) { - override fun findSuitableResources(load: LoadDimension, resources: List<Resource>): Resource? { + override fun findSuitableResource(load: LoadDimension, resources: List<Resource>): Resource? { val result = search(load, resources, 0, resources.size - 1) if( result == -1 ) { return null; @@ -19,22 +19,23 @@ class BinarySearch(benchmarkExecutor: BenchmarkExecutor, results: Results) : Sea if (lower > upper) { throw IllegalArgumentException() } - if (lower == upper ) { - if (this.benchmarkExecutor.runExperiment(load, resources[lower])) return lower; + // special case: length == 1 or 2 + if (lower == upper) { + if (this.benchmarkExecutor.runExperiment(load, resources[lower])) return lower else { if (lower + 1 == resources.size) return - 1 - return lower + 1; + return lower + 1 } } else { - // (true, true), (false, true), (false, false) // (false, false, false, true, false, true, false, true) + // apply binary search for a list with length > 2 and adjust upper and lower depending on the result for `resources[mid]` val mid = (upper + lower) / 2 if (this.benchmarkExecutor.runExperiment(load, resources[mid])) { if (mid == lower) { return lower } - return search(load, resources, lower, mid - 1 ); + return search(load, resources, lower, mid - 1 ) } else { - return search(load, resources, mid + 1 , upper); + return search(load, resources, mid + 1 , upper) } } } diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/strategies/searchstrategy/CompositeStrategy.kt b/theodolite-quarkus/src/main/kotlin/theodolite/strategies/searchstrategy/CompositeStrategy.kt index ed8750083881f72a091c0acd923ef7c46ff79db7..20033a1d5084921f7d033dd3f5cb7cca6409c90c 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/strategies/searchstrategy/CompositeStrategy.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/strategies/searchstrategy/CompositeStrategy.kt @@ -8,11 +8,11 @@ import theodolite.util.Results class CompositeStrategy(benchmarkExecutor: BenchmarkExecutor, val searchStrategy: SearchStrategy, val restrictionStrategies: Set<RestrictionStrategy>, results: Results) : SearchStrategy(benchmarkExecutor, results) { - override fun findSuitableResources(load: LoadDimension, resources: List<Resource>): Resource? { + override fun findSuitableResource(load: LoadDimension, resources: List<Resource>): Resource? { var restrictedResources = resources.toList() for (strategy in this.restrictionStrategies) { restrictedResources = restrictedResources.intersect(strategy.next(load, resources)).toList() } - return this.searchStrategy.findSuitableResources(load, restrictedResources) + return this.searchStrategy.findSuitableResource(load, restrictedResources) } } \ No newline at end of file diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/strategies/searchstrategy/LinearSearch.kt b/theodolite-quarkus/src/main/kotlin/theodolite/strategies/searchstrategy/LinearSearch.kt index 37fa4ca41678c285bb4fb6a86633dedecb78ba03..abbedf3c0acc1e1de4afc59b7a9c526a05928783 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/strategies/searchstrategy/LinearSearch.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/strategies/searchstrategy/LinearSearch.kt @@ -7,7 +7,7 @@ import theodolite.util.Results class LinearSearch(benchmarkExecutor: BenchmarkExecutor, results: Results) : SearchStrategy(benchmarkExecutor, results) { - override fun findSuitableResources(load: LoadDimension, resources: List<Resource>): Resource? { + override fun findSuitableResource(load: LoadDimension, resources: List<Resource>): Resource? { for (res in resources) { if (this.benchmarkExecutor.runExperiment(load, res)) return res } diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/strategies/searchstrategy/SearchStrategy.kt b/theodolite-quarkus/src/main/kotlin/theodolite/strategies/searchstrategy/SearchStrategy.kt index 7e151ef6f3cfaf16a48c43f7369bbfc8041e9295..2b0143c52ecbfc6fc140841d3e0166b13a87a44d 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/strategies/searchstrategy/SearchStrategy.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/strategies/searchstrategy/SearchStrategy.kt @@ -6,5 +6,5 @@ import theodolite.util.Resource import theodolite.util.Results abstract class SearchStrategy(val benchmarkExecutor: BenchmarkExecutor, val results: Results) { - abstract fun findSuitableResources(load: LoadDimension, resources: List<Resource>): Resource?; + abstract fun findSuitableResource(load: LoadDimension, resources: List<Resource>): Resource?; } \ No newline at end of file diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/util/Benchmark.kt b/theodolite-quarkus/src/main/kotlin/theodolite/util/Benchmark.kt index 2b61b2e16c76fa960906be40e27ad7bb1638734c..8ba7877cfa7a0a279c1520e64a2a4db015a312b4 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/util/Benchmark.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/util/Benchmark.kt @@ -4,10 +4,17 @@ import theodolite.k8s.UC1Benchmark // todo: needs cluster and resource config abstract class Benchmark(val config: UC1Benchmark.UC1BenchmarkConfig) { - abstract fun start(load: LoadDimension, resources: Resource); + fun start(load: LoadDimension, resources: Resource) { + this.initializeClusterEnvironment() + this.startSUT(resources) + this.startWorkloadGenerator(load) + } - abstract fun stop(); + abstract fun initializeClusterEnvironment(); + abstract fun clearClusterEnvironment(); - abstract fun startWorkloadGenerator(wg: String, load: LoadDimension, ucId: String); + abstract fun startSUT(resources: Resource); + + abstract fun startWorkloadGenerator(load: LoadDimension); } \ No newline at end of file diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/util/KafkaBenchmark.kt b/theodolite-quarkus/src/main/kotlin/theodolite/util/KafkaBenchmark.kt deleted file mode 100644 index d8b8405f5abfb839942514a07a2220287a653daa..0000000000000000000000000000000000000000 --- a/theodolite-quarkus/src/main/kotlin/theodolite/util/KafkaBenchmark.kt +++ /dev/null @@ -1,16 +0,0 @@ -package theodolite.util - -class KafkaBenchmark(config: Map<String, Any>): Benchmark(config) { - - override fun start(load: LoadDimension, resources: Resource) { - TODO("Not yet implemented") - } - - override fun stop() { - TODO("Not yet implemented") - } - - override fun startWorkloadGenerator(wg: String, load: LoadDimension, ucId: String) { - TODO("Not yet implemented") - } -} \ No newline at end of file diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/util/TestBenchmark.kt b/theodolite-quarkus/src/main/kotlin/theodolite/util/TestBenchmark.kt index 6d2dbb1161acdfd501569be1d00d8c3f76c79d5f..faf7bf5f70fe574a48cb82074316cf2fe69414b6 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/util/TestBenchmark.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/util/TestBenchmark.kt @@ -1,15 +1,34 @@ package theodolite.util -class TestBenchmark: Benchmark(config = emptyMap()) { - override fun start() { +import theodolite.k8s.UC1Benchmark + +class TestBenchmark: Benchmark(UC1Benchmark.UC1BenchmarkConfig( + zookeeperConnectionString = "", + kafkaIPConnectionString = "", + schemaRegistryConnectionString = "", + kafkaTopics = emptyList(), + kafkaReplication = 0, + kafkaPartition = 0, + ucServicePath = "", + ucDeploymentPath = "", + wgDeploymentPath = "", + ucImageURL = "", + wgImageURL = "" +)){ + + override fun initializeClusterEnvironment() { + TODO("Not yet implemented") + } + + override fun clearClusterEnvironment() { TODO("Not yet implemented") } - override fun stop() { + override fun startSUT(resources: Resource) { TODO("Not yet implemented") } - override fun startWorkloadGenerator(wg: String, dimValue: Int, ucId: String) { + override fun startWorkloadGenerator(load: LoadDimension) { TODO("Not yet implemented") } } \ No newline at end of file diff --git a/theodolite-quarkus/YAML/aggregation-deployment.yaml b/theodolite-quarkus/src/main/resources/yaml/aggregation-deployment.yaml similarity index 100% rename from theodolite-quarkus/YAML/aggregation-deployment.yaml rename to theodolite-quarkus/src/main/resources/yaml/aggregation-deployment.yaml diff --git a/theodolite-quarkus/YAML/aggregation-service.yaml b/theodolite-quarkus/src/main/resources/yaml/aggregation-service.yaml similarity index 100% rename from theodolite-quarkus/YAML/aggregation-service.yaml rename to theodolite-quarkus/src/main/resources/yaml/aggregation-service.yaml diff --git a/theodolite-quarkus/YAML/jmx-configmap.yaml b/theodolite-quarkus/src/main/resources/yaml/jmx-configmap.yaml similarity index 100% rename from theodolite-quarkus/YAML/jmx-configmap.yaml rename to theodolite-quarkus/src/main/resources/yaml/jmx-configmap.yaml diff --git a/theodolite-quarkus/YAML/service-monitor.yaml b/theodolite-quarkus/src/main/resources/yaml/service-monitor.yaml similarity index 100% rename from theodolite-quarkus/YAML/service-monitor.yaml rename to theodolite-quarkus/src/main/resources/yaml/service-monitor.yaml diff --git a/theodolite-quarkus/YAML/theodolite.yaml b/theodolite-quarkus/src/main/resources/yaml/theodolite.yaml similarity index 100% rename from theodolite-quarkus/YAML/theodolite.yaml rename to theodolite-quarkus/src/main/resources/yaml/theodolite.yaml diff --git a/theodolite-quarkus/YAML/workloadGenerator.yaml b/theodolite-quarkus/src/main/resources/yaml/workloadGenerator.yaml similarity index 100% rename from theodolite-quarkus/YAML/workloadGenerator.yaml rename to theodolite-quarkus/src/main/resources/yaml/workloadGenerator.yaml diff --git a/theodolite-quarkus/src/test/kotlin/theodolite/CompositeStrategyTest.kt b/theodolite-quarkus/src/test/kotlin/theodolite/CompositeStrategyTest.kt index 0f9b1b850b9963aa9e9851f963e4f02abcf09924..a9961d69bc22b8321577f1c7bb9bc37965f67360 100644 --- a/theodolite-quarkus/src/test/kotlin/theodolite/CompositeStrategyTest.kt +++ b/theodolite-quarkus/src/test/kotlin/theodolite/CompositeStrategyTest.kt @@ -40,7 +40,7 @@ class CompositeStrategyTest { expected.add(null) for(load in mockLoads) { - actual.add(strategy.findSuitableResources(load, mockResources)) + actual.add(strategy.findSuitableResource(load, mockResources)) } assertEquals(actual, expected) @@ -71,7 +71,7 @@ class CompositeStrategyTest { expected.add(null) for(load in mockLoads) { - actual.add(strategy.findSuitableResources(load, mockResources)) + actual.add(strategy.findSuitableResource(load, mockResources)) } assertEquals(actual, expected) @@ -101,7 +101,7 @@ class CompositeStrategyTest { val expected: ArrayList<Resource?> = ArrayList(listOf(0,2,2,3,4,6,7).map{ x -> Resource(x)}) for(load in mockLoads) { - actual.add(strategy.findSuitableResources(load, mockResources)) + actual.add(strategy.findSuitableResource(load, mockResources)) } assertEquals(actual, expected)