diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/BenchmarkContext.kt b/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/BenchmarkExecution.kt similarity index 97% rename from theodolite-quarkus/src/main/kotlin/theodolite/benchmark/BenchmarkContext.kt rename to theodolite-quarkus/src/main/kotlin/theodolite/benchmark/BenchmarkExecution.kt index c734c22a99869a51f0b930505717ad0be70a988b..4fba0d3623f4fa59bf112830e19a01a8f03d5719 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/BenchmarkContext.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/BenchmarkExecution.kt @@ -4,7 +4,7 @@ import theodolite.util.ConfigurationOverride import kotlin.properties.Delegates -class BenchmarkContext() { +class BenchmarkExecution() { lateinit var name: String lateinit var benchmark: String lateinit var load: LoadDefinition diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt index c94beee061e361e42cd2152753f44b693a8aa1ed..9189baf16c914261a2f5bc2c5ed12d5d1a9512e0 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt @@ -1,8 +1,8 @@ package theodolite.execution -import theodolite.benchmark.BenchmarkContext +import theodolite.benchmark.BenchmarkExecution import theodolite.benchmark.KubernetesBenchmark -import theodolite.strategies.StrategiesManager +import theodolite.strategies.StrategyFactory import theodolite.strategies.searchstrategy.CompositeStrategy import theodolite.util.Config import theodolite.util.LoadDimension @@ -11,14 +11,14 @@ import theodolite.util.Results import java.time.Duration class TheodoliteExecutor( - private val config: BenchmarkContext, + private val config: BenchmarkExecution, private val kubernetesBenchmark: KubernetesBenchmark ) { private fun buildConfig(): Config{ val results = Results() - val strategyManager = StrategiesManager() + val strategyFactory = StrategyFactory() val executionDuration = Duration.ofSeconds(config.execution.duration) val executor = BenchmarkExecutorImpl(kubernetesBenchmark, results, executionDuration, config.configOverrides) @@ -28,8 +28,8 @@ class TheodoliteExecutor( resources = config.resources.resourceValues.map { resource -> Resource(resource, config.load.loadType) }, compositeStrategy = CompositeStrategy( benchmarkExecutor = executor, - searchStrategy = strategyManager.createSearchStrategy(executor, config.execution.strategy), - restrictionStrategies = strategyManager.createRestrictionStrategy(results, config.execution.restrictions)), + searchStrategy = strategyFactory.createSearchStrategy(executor, config.execution.strategy), + restrictionStrategies = strategyFactory.createRestrictionStrategy(results, config.execution.restrictions)), executionDuration = executionDuration) } diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteYamlExecutor.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteYamlExecutor.kt index 80eb2eee17e8df6c4e1b97b81ad69917b22d0cc5..c0b4e5bacaa55f70af323a5e88b04b00dbdb9f19 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteYamlExecutor.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteYamlExecutor.kt @@ -1,6 +1,6 @@ package theodolite.execution -import theodolite.benchmark.BenchmarkContext +import theodolite.benchmark.BenchmarkExecution import theodolite.util.YamlParser import theodolite.benchmark.KubernetesBenchmark @@ -8,11 +8,10 @@ class TheodoliteYamlExecutor { fun run() { // load the Benchmark context and the benchmark type var parser = YamlParser() - val benchmarkContext = parser.parse("./../../../resources/main/yaml/testContext.yaml", BenchmarkContext::class.java) !! + val benchmarkExecution = parser.parse("./../../../resources/main/yaml/testBenchmarkExecution.yaml", BenchmarkExecution::class.java) !! val benchmark = parser.parse("./../../../resources/main/yaml/testBenchmarkType.yaml", KubernetesBenchmark::class.java) !! - // TheodoliteExecutor benchmarkContext, benchmark - val executor = TheodoliteExecutor(benchmarkContext, benchmark) + val executor = TheodoliteExecutor(benchmarkExecution, benchmark) executor.run() } } \ No newline at end of file diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/strategies/StrategiesManager.kt b/theodolite-quarkus/src/main/kotlin/theodolite/strategies/StrategyFactory.kt similarity index 97% rename from theodolite-quarkus/src/main/kotlin/theodolite/strategies/StrategiesManager.kt rename to theodolite-quarkus/src/main/kotlin/theodolite/strategies/StrategyFactory.kt index 280cca54576f390413d7d5fe3d62f7885fa6dd1d..ccbe6fac4106dd47dbc61684af4184ff26733df1 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/strategies/StrategiesManager.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/strategies/StrategyFactory.kt @@ -9,7 +9,7 @@ import theodolite.strategies.searchstrategy.SearchStrategy import theodolite.util.Results import java.lang.IllegalArgumentException -class StrategiesManager { +class StrategyFactory { fun createSearchStrategy(executor: BenchmarkExecutor, searchStrategyString: String): SearchStrategy { return when (searchStrategyString) { diff --git a/theodolite-quarkus/src/main/resources/yaml/testContext.yaml b/theodolite-quarkus/src/main/resources/yaml/testBenchmarkExecution.yaml similarity index 100% rename from theodolite-quarkus/src/main/resources/yaml/testContext.yaml rename to theodolite-quarkus/src/main/resources/yaml/testBenchmarkExecution.yaml