diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/BenchmarkExecutor.kt b/theodolite-quarkus/src/main/kotlin/theodolite/BenchmarkExecutor.kt deleted file mode 100644 index 1790cfe81e96b5de098a7ca3f53d955886cb9827..0000000000000000000000000000000000000000 --- a/theodolite-quarkus/src/main/kotlin/theodolite/BenchmarkExecutor.kt +++ /dev/null @@ -1,17 +0,0 @@ -package theodolite - -class BenchmarkExecutor(benchmark: Benchmark) { - val benchmark: Benchmark = benchmark - - fun waitExecution(executionMinutes: Int) { - val milliToMinutes = 60000 - System.out.println("Wait while executing") - for (i in 1.rangeTo(executionMinutes)) { - Thread.sleep((milliToMinutes * i).toLong()) - System.out.println("Executed: $i minutes") - } - - System.out.println("Execution finished") - } - fun runExperiment() {} -} diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/GreetingResource.kt b/theodolite-quarkus/src/main/kotlin/theodolite/GreetingResource.kt deleted file mode 100644 index 2cf79f2d805344ba2b19f8e0aea58ad682a5e36f..0000000000000000000000000000000000000000 --- a/theodolite-quarkus/src/main/kotlin/theodolite/GreetingResource.kt +++ /dev/null @@ -1,14 +0,0 @@ -package theodolite - -import javax.ws.rs.GET -import javax.ws.rs.Path -import javax.ws.rs.Produces -import javax.ws.rs.core.MediaType - -@Path("/hello-resteasy") -class GreetingResource { - - @GET - @Produces(MediaType.TEXT_PLAIN) - fun hello() = "Hello RESTEasy" -} \ No newline at end of file diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/Main.kt b/theodolite-quarkus/src/main/kotlin/theodolite/Main.kt index 57031509dfef718bf2b2e9ed01bf1a516f97001a..694bd60fd528917a0b84a92ee5a46738a40f2cd6 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/Main.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/Main.kt @@ -2,6 +2,7 @@ package theodolite import io.quarkus.runtime.annotations.QuarkusMain import mu.KotlinLogging +import theodolite.execution.DeploymentManager private val logger = KotlinLogging.logger {} diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/Benchmark.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/Benchmark.kt similarity index 75% rename from theodolite-quarkus/src/main/kotlin/theodolite/Benchmark.kt rename to theodolite-quarkus/src/main/kotlin/theodolite/execution/Benchmark.kt index b680072787989093ab7cbc9a08bec31ed9968d44..77112a652f343b7ebf38bc0ed67a0b7f711fc552 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/Benchmark.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/Benchmark.kt @@ -1,9 +1,9 @@ -package theodolite +package theodolite.execution class Benchmark { fun start() {} fun stop() {} - fun startWorkloadGenerator(wg: String, dimValue: Int, ucId: String) { } + fun startWorkloadGenerator(wg: String, dimValue: Int, ucId: String) {} } diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/execution/BenchmarkExecutor.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/BenchmarkExecutor.kt new file mode 100644 index 0000000000000000000000000000000000000000..94b4df4dd4be47dc997e2f347628180507983b31 --- /dev/null +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/BenchmarkExecutor.kt @@ -0,0 +1,18 @@ +package theodolite.execution + +class BenchmarkExecutor(benchmark: Benchmark) { + val benchmark: Benchmark = benchmark + + fun waitExecution(executionMinutes: Int) { + val milliToMinutes = 60000 + System.out.println("Wait while executing") + for (i in 1.rangeTo(executionMinutes)) { + Thread.sleep((milliToMinutes * i).toLong()) + System.out.println("Executed: $i minutes") + } + + System.out.println("Execution finished") + } + + fun runExperiment() {} +} diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/ConfigMapManager.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/ConfigMapManager.kt similarity index 93% rename from theodolite-quarkus/src/main/kotlin/theodolite/ConfigMapManager.kt rename to theodolite-quarkus/src/main/kotlin/theodolite/execution/ConfigMapManager.kt index 92dd638cdf611d4aad4d86bf8508f8a56e2afbf4..43daddc5dfca1a619e2b2c4ddc6349a3116e4c97 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/ConfigMapManager.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/ConfigMapManager.kt @@ -1,4 +1,4 @@ -package theodolite +package theodolite.execution import io.fabric8.kubernetes.api.model.ConfigMap import io.fabric8.kubernetes.client.NamespacedKubernetesClient diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/DeploymentManager.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/DeploymentManager.kt similarity index 98% rename from theodolite-quarkus/src/main/kotlin/theodolite/DeploymentManager.kt rename to theodolite-quarkus/src/main/kotlin/theodolite/execution/DeploymentManager.kt index 0dc4c356bbeb4a3a1897854efa3394a567266441..12eeb73b6db5fd1fd65f58fd4b0292d720419bd5 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/DeploymentManager.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/DeploymentManager.kt @@ -1,4 +1,4 @@ -package theodolite +package theodolite.execution import io.fabric8.kubernetes.api.model.Container import io.fabric8.kubernetes.api.model.EnvVar diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/ServiceManager.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/ServiceManager.kt similarity index 95% rename from theodolite-quarkus/src/main/kotlin/theodolite/ServiceManager.kt rename to theodolite-quarkus/src/main/kotlin/theodolite/execution/ServiceManager.kt index 1e8f627f28afce6c13b8af175e3c38721f5abc72..d0e21ab5a91db6076492eea30ce397df5e4a4089 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/ServiceManager.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/ServiceManager.kt @@ -1,4 +1,4 @@ -package theodolite +package theodolite.execution import io.fabric8.kubernetes.api.model.Service import io.fabric8.kubernetes.client.NamespacedKubernetesClient diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/YamlLoader.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/YamlLoader.kt similarity index 98% rename from theodolite-quarkus/src/main/kotlin/theodolite/YamlLoader.kt rename to theodolite-quarkus/src/main/kotlin/theodolite/execution/YamlLoader.kt index 1a7e36dabe101cfdb81dcdc4d27d8871cdd2a6f6..acdb75bfe2e1b9884b6c81480468e8050f71c406 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/YamlLoader.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/YamlLoader.kt @@ -1,4 +1,4 @@ -package theodolite +package theodolite.execution import io.fabric8.kubernetes.api.model.ConfigMap import io.fabric8.kubernetes.api.model.Service diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/TopicManager.kt b/theodolite-quarkus/src/main/kotlin/theodolite/k8s/TopicManager.kt similarity index 94% rename from theodolite-quarkus/src/main/kotlin/theodolite/TopicManager.kt rename to theodolite-quarkus/src/main/kotlin/theodolite/k8s/TopicManager.kt index a62a8d8254d740f8362ea284c27aa43a6fdee71c..23954d19831e022a2590c5493509e9b4d688ca93 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/TopicManager.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/k8s/TopicManager.kt @@ -1,4 +1,4 @@ -package theodolite +package theodolite.k8s import org.apache.kafka.clients.admin.AdminClient import org.apache.kafka.clients.admin.AdminClientConfig @@ -12,7 +12,7 @@ class TopicManager(boostrapIp: String) { init { try { kafkaAdmin = AdminClient.create(props) - } catch (e : Exception) { + } catch (e: Exception) { System.out.println(e.toString()) } } @@ -45,7 +45,7 @@ class TopicManager(boostrapIp: String) { try { result.all().get() - } catch (ex:Exception) { + } catch (ex: Exception) { System.out.println(ex.toString()) } System.out.println("Topics deleted") diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/WorkloadGeneratorStateCleaner.kt b/theodolite-quarkus/src/main/kotlin/theodolite/k8s/WorkloadGeneratorStateCleaner.kt similarity index 88% rename from theodolite-quarkus/src/main/kotlin/theodolite/WorkloadGeneratorStateCleaner.kt rename to theodolite-quarkus/src/main/kotlin/theodolite/k8s/WorkloadGeneratorStateCleaner.kt index c519b0c843ae3f75c21a7596446c700972b44753..f584782222c525ff1619151c16b73f2580373daa 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/WorkloadGeneratorStateCleaner.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/k8s/WorkloadGeneratorStateCleaner.kt @@ -1,4 +1,4 @@ -package theodolite +package theodolite.k8s import org.apache.zookeeper.KeeperException import org.apache.zookeeper.WatchedEvent @@ -15,7 +15,7 @@ class WorkloadGeneratorStateCleaner(ip: String) { try { val watcher: Watcher = ZookeperWatcher() // defined below zookeeperClient = ZooKeeper(ip, sessionTimeout, watcher) - } catch (e:Exception) { + } catch (e: Exception) { System.out.println(e.toString()) } } @@ -33,12 +33,14 @@ class WorkloadGeneratorStateCleaner(ip: String) { try { val clients = zookeeperClient.getChildren(path, true) - if (clients.isEmpty()){ + if (clients.isEmpty()) { break; } } catch (ex: Exception) { when (ex) { - is KeeperException -> { deleted = true } + is KeeperException -> { + deleted = true + } is InterruptedException -> { System.out.println(ex.toString()) } diff --git a/theodolite-quarkus/src/native-test/kotlin/theodolite/NativeGreetingResourceIT.kt b/theodolite-quarkus/src/native-test/kotlin/theodolite/NativeGreetingResourceIT.kt deleted file mode 100644 index 26e8900ffe1a17b71fc23e1327fa649421548e36..0000000000000000000000000000000000000000 --- a/theodolite-quarkus/src/native-test/kotlin/theodolite/NativeGreetingResourceIT.kt +++ /dev/null @@ -1,6 +0,0 @@ -package theodolite - -import io.quarkus.test.junit.NativeImageTest - -@NativeImageTest -class NativeGreetingResourceIT : GreetingResourceTest() \ No newline at end of file