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

Minor style fixes

parent 6b2d51f8
No related branches found
No related tags found
3 merge requests!159Re-implementation of Theodolite with Kotlin/Quarkus,!157Update Graal Image in CI pipeline,!83WIP: Re-implementation of Theodolite with Kotlin/Quarkus
Pipeline #2829 passed
......@@ -39,12 +39,11 @@ class BenchmarkExecutorImpl(
* Analyse the experiment, if [run] is true, otherwise the experiment was canceled by the user.
*/
if (this.run.get()) {
result =
AnalysisExecutor(slo = slo, executionId = executionId).analyze(
load = load,
res = res,
executionDuration = executionDuration
)
result = AnalysisExecutor(slo = slo, executionId = executionId).analyze(
load = load,
res = res,
executionDuration = executionDuration
)
this.results.setResult(Pair(load, res), result)
}
......@@ -52,7 +51,7 @@ class BenchmarkExecutorImpl(
benchmarkDeployment.teardown()
} catch (e: Exception) {
logger.warn { "Error while tearing down the benchmark deployment." }
logger.debug { "Teardown failed, caused by: $e " }
logger.debug { "Teardown failed, caused by: $e" }
}
return result
......
......@@ -46,7 +46,7 @@ class K8sManager(private val client: NamespacedKubernetesClient) {
val label = resource.spec.selector.matchLabels["app"]!!
this.client.apps().deployments().delete(resource)
blockUntilPodDeleted(label)
logger.info { "Deployment '$resource' deleted." }
logger.info { "Deployment '${resource.metadata.name}' deleted." }
}
is Service ->
this.client.services().delete(resource)
......@@ -56,7 +56,7 @@ class K8sManager(private val client: NamespacedKubernetesClient) {
val label = resource.spec.selector.matchLabels["app"]!!
this.client.apps().statefulSets().delete(resource)
blockUntilPodDeleted(label)
logger.info { "StatefulSet '$resource' deleted." }
logger.info { "StatefulSet '$resource.metadata.name' deleted." }
}
is ServiceMonitorWrapper -> resource.delete(client)
else -> throw IllegalArgumentException("Unknown Kubernetes resource.")
......
......@@ -11,6 +11,7 @@ import theodolite.util.Results
* @param results [Result] object used as a basis to restrict the resources.
*/
class LowerBoundRestriction(results: Results) : RestrictionStrategy(results) {
override fun apply(load: LoadDimension, resources: List<Resource>): List<Resource> {
val maxLoad: LoadDimension? = this.results.getMaxBenchmarkedLoad(load)
var lowerBound: Resource? = this.results.getMinRequiredInstances(maxLoad)
......@@ -19,4 +20,5 @@ class LowerBoundRestriction(results: Results) : RestrictionStrategy(results) {
}
return resources.filter { x -> x.get() >= lowerBound.get() }
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment