Skip to content
Snippets Groups Projects
Commit 0d53d57d authored by Sören Henning's avatar Sören Henning
Browse files

Merge branch '187-fix-empty-list-bug' into 'theodolite-kotlin'

Fix small bugs

See merge request !107
parents f580e1ae 99968c4e
No related branches found
No related tags found
4 merge requests!159Re-implementation of Theodolite with Kotlin/Quarkus,!157Update Graal Image in CI pipeline,!107Fix small bugs,!83WIP: Re-implementation of Theodolite with Kotlin/Quarkus
Pipeline #2463 passed
......@@ -8,6 +8,6 @@ interface Benchmark {
fun buildDeployment(
load: LoadDimension,
res: Resource,
configurationOverrides: List<ConfigurationOverride>
configurationOverrides: List<ConfigurationOverride?>
): BenchmarkDeployment
}
......@@ -10,7 +10,7 @@ class BenchmarkExecution {
lateinit var resources: ResourceDefinition
lateinit var slos: List<Slo>
lateinit var execution: Execution
lateinit var configOverrides: List<ConfigurationOverride>
lateinit var configOverrides: List<ConfigurationOverride?>
class Execution {
lateinit var strategy: String
......
......
......@@ -40,7 +40,7 @@ class KubernetesBenchmark : Benchmark {
override fun buildDeployment(
load: LoadDimension,
res: Resource,
configurationOverrides: List<ConfigurationOverride>
configurationOverrides: List<ConfigurationOverride?>
): BenchmarkDeployment {
val resources = loadKubernetesResources(this.appResource + this.loadGenResource)
val patcherFactory = PatcherFactory()
......@@ -50,7 +50,7 @@ class KubernetesBenchmark : Benchmark {
res.getType().forEach{ patcherDefinition -> patcherFactory.createPatcher(patcherDefinition, resources).patch(res.get().toString()) }
// Patch the given overrides
configurationOverrides.forEach { override -> patcherFactory.createPatcher(override.patcher, resources).patch(override.value) }
configurationOverrides.forEach { override -> override?.let { patcherFactory.createPatcher(it.patcher, resources).patch(override.value) } }
return KubernetesBenchmarkDeployment(
......
......
......@@ -23,7 +23,7 @@ abstract class BenchmarkExecutor(
val benchmark: Benchmark,
val results: Results,
val executionDuration: Duration,
configurationOverrides: List<ConfigurationOverride>,
configurationOverrides: List<ConfigurationOverride?>,
val slo: BenchmarkExecution.Slo
) {
......
......
......@@ -16,7 +16,7 @@ class BenchmarkExecutorImpl(
benchmark: Benchmark,
results: Results,
executionDuration: Duration,
private val configurationOverrides: List<ConfigurationOverride>,
private val configurationOverrides: List<ConfigurationOverride?>,
slo: BenchmarkExecution.Slo
) : BenchmarkExecutor(benchmark, results, executionDuration, configurationOverrides, slo) {
override fun runExperiment(load: LoadDimension, res: Resource): Boolean {
......
......
......@@ -22,11 +22,13 @@ object TheodoliteYamlExecutor {
val benchmark =
parser.parse("./../../../resources/main/yaml/BenchmarkType.yaml", KubernetesBenchmark::class.java)!!
Runtime.getRuntime().addShutdownHook(Shutdown(benchmarkExecution, benchmark))
val shutdown = Shutdown(benchmarkExecution, benchmark)
Runtime.getRuntime().addShutdownHook(shutdown)
val executor = TheodoliteExecutor(benchmarkExecution, benchmark)
executor.run()
logger.info { "Theodolite finished" }
Runtime.getRuntime().removeShutdownHook(shutdown)
exitProcess(0)
}
}
......@@ -11,7 +11,7 @@ class TestBenchmark : Benchmark {
override fun buildDeployment(
load: LoadDimension,
res: Resource,
configurationOverrides: List<ConfigurationOverride>
configurationOverrides: List<ConfigurationOverride?>
): BenchmarkDeployment {
return TestBenchmarkDeployment()
}
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment