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

Revert `loads` to `load`

parent a843e58e
No related branches found
No related tags found
No related merge requests found
Pipeline #8909 failed
Showing with 26 additions and 28 deletions
...@@ -20,7 +20,7 @@ spec: ...@@ -20,7 +20,7 @@ spec:
properties: properties:
spec: spec:
type: object type: object
required: ["benchmark", "loads", "resources", "execution", "configOverrides"] required: ["benchmark", "load", "resources", "execution"]
properties: properties:
name: name:
description: This field exists only for technical reasons and should not be set by the user. The value of the field will be overwritten. description: This field exists only for technical reasons and should not be set by the user. The value of the field will be overwritten.
...@@ -29,7 +29,7 @@ spec: ...@@ -29,7 +29,7 @@ spec:
benchmark: benchmark:
description: The name of the benchmark this execution is referring to. description: The name of the benchmark this execution is referring to.
type: string type: string
loads: # definition of the load dimension load: # definition of the load dimension
description: Specifies the load values that are benchmarked. description: Specifies the load values that are benchmarked.
type: object type: object
required: ["loadType", "loadValues"] required: ["loadType", "loadValues"]
...@@ -130,6 +130,7 @@ spec: ...@@ -130,6 +130,7 @@ spec:
default: {} default: {}
value: value:
type: string type: string
default: []
status: status:
type: object type: object
properties: properties:
......
...@@ -4,7 +4,7 @@ metadata: ...@@ -4,7 +4,7 @@ metadata:
name: theodolite-example-execution name: theodolite-example-execution
spec: spec:
benchmark: "example-benchmark" benchmark: "example-benchmark"
loads: load:
loadType: "NumSensors" loadType: "NumSensors"
loadValues: [25000, 50000, 75000, 100000, 125000, 150000] loadValues: [25000, 50000, 75000, 100000, 125000, 150000]
resources: resources:
......
...@@ -58,7 +58,7 @@ class TheodoliteExecutor( ...@@ -58,7 +58,7 @@ class TheodoliteExecutor(
val loadDimensionPatcherDefinition = val loadDimensionPatcherDefinition =
PatcherDefinitionFactory().createPatcherDefinition( PatcherDefinitionFactory().createPatcherDefinition(
benchmarkExecution.loads.loadType, benchmarkExecution.load.loadType,
this.benchmark.loadTypes this.benchmark.loadTypes
) )
...@@ -81,11 +81,11 @@ class TheodoliteExecutor( ...@@ -81,11 +81,11 @@ class TheodoliteExecutor(
waitForResourcesEnabled = this.benchmark.waitForResourcesEnabled waitForResourcesEnabled = this.benchmark.waitForResourcesEnabled
) )
if (benchmarkExecution.loads.loadValues != benchmarkExecution.loads.loadValues.sorted()) { if (benchmarkExecution.load.loadValues != benchmarkExecution.load.loadValues.sorted()) {
benchmarkExecution.loads.loadValues = benchmarkExecution.loads.loadValues.sorted() benchmarkExecution.load.loadValues = benchmarkExecution.load.loadValues.sorted()
logger.info { logger.info {
"Load values are not sorted correctly, Theodolite sorts them in ascending order." + "Load values are not sorted correctly, Theodolite sorts them in ascending order." +
"New order is: ${benchmarkExecution.loads.loadValues}" "New order is: ${benchmarkExecution.load.loadValues}"
} }
} }
...@@ -98,7 +98,7 @@ class TheodoliteExecutor( ...@@ -98,7 +98,7 @@ class TheodoliteExecutor(
} }
return Config( return Config(
loads = benchmarkExecution.loads.loadValues, loads = benchmarkExecution.load.loadValues,
resources = benchmarkExecution.resources.resourceValues, resources = benchmarkExecution.resources.resourceValues,
searchStrategy = strategyFactory.createSearchStrategy(experimentRunner, benchmarkExecution.execution.strategy.name, searchStrategy = strategyFactory.createSearchStrategy(experimentRunner, benchmarkExecution.execution.strategy.name,
benchmarkExecution.execution.strategy.searchStrategy, benchmarkExecution.execution.strategy.restrictions, benchmarkExecution.execution.strategy.searchStrategy, benchmarkExecution.execution.strategy.restrictions,
......
...@@ -12,7 +12,7 @@ import kotlin.properties.Delegates ...@@ -12,7 +12,7 @@ import kotlin.properties.Delegates
* A BenchmarkExecution consists of: * A BenchmarkExecution consists of:
* - A [name]. * - A [name].
* - The [benchmark] that should be executed. * - The [benchmark] that should be executed.
* - The [loads]s that should be checked in the benchmark. * - The [load]s that should be checked in the benchmark.
* - The [resources] that should be checked in the benchmark. * - The [resources] that should be checked in the benchmark.
* - The [slos] further restrict the Benchmark SLOs for the evaluation of the experiments. * - The [slos] further restrict the Benchmark SLOs for the evaluation of the experiments.
* - An [execution] that encapsulates: the strategy, the duration, and the restrictions * - An [execution] that encapsulates: the strategy, the duration, and the restrictions
...@@ -28,7 +28,7 @@ class BenchmarkExecution : KubernetesResource { ...@@ -28,7 +28,7 @@ class BenchmarkExecution : KubernetesResource {
var executionId: Int = 0 var executionId: Int = 0
lateinit var name: String lateinit var name: String
lateinit var benchmark: String lateinit var benchmark: String
lateinit var loads: LoadDefinition lateinit var load: LoadDefinition
lateinit var resources: ResourceDefinition lateinit var resources: ResourceDefinition
lateinit var slos: List<SloConfiguration> lateinit var slos: List<SloConfiguration>
lateinit var execution: Execution lateinit var execution: Execution
......
...@@ -69,8 +69,8 @@ internal class CRDExecutionTest { ...@@ -69,8 +69,8 @@ internal class CRDExecutionTest {
assertEquals("uc1-kstreams", execution.benchmark) assertEquals("uc1-kstreams", execution.benchmark)
assertEquals(mutableListOf<ConfigurationOverride?>(), execution.configOverrides) assertEquals(mutableListOf<ConfigurationOverride?>(), execution.configOverrides)
assertEquals("NumSensors", execution.loads.loadType) assertEquals("NumSensors", execution.load.loadType)
assertEquals(listOf(25000, 50000, 75000, 100000, 125000, 150000),execution.loads.loadValues) assertEquals(listOf(25000, 50000, 75000, 100000, 125000, 150000), execution.load.loadValues)
assertEquals("Instances", execution.resources.resourceType) assertEquals("Instances", execution.resources.resourceType)
assertEquals(listOf(1, 2, 3, 4, 5), execution.resources.resourceValues) assertEquals(listOf(1, 2, 3, 4, 5), execution.resources.resourceValues)
......
...@@ -33,12 +33,12 @@ class ExecutionCRDummy(name: String, benchmark: String) { ...@@ -33,12 +33,12 @@ class ExecutionCRDummy(name: String, benchmark: String) {
resourceDef.resourceType = "" resourceDef.resourceType = ""
resourceDef.resourceValues = emptyList() resourceDef.resourceValues = emptyList()
val strat = BenchmarkExecution.Strategy() val strategy = BenchmarkExecution.Strategy().apply {
strat.name = "" this.name = ""
strat.restrictions = emptyList() this.restrictions = emptyList()
strat.guessStrategy = "" this.guessStrategy = ""
strat.searchStrategy = "" this.searchStrategy = ""
}
val exec = BenchmarkExecution.Execution() val exec = BenchmarkExecution.Execution()
exec.afterTeardownDelay = 0 exec.afterTeardownDelay = 0
...@@ -46,11 +46,11 @@ class ExecutionCRDummy(name: String, benchmark: String) { ...@@ -46,11 +46,11 @@ class ExecutionCRDummy(name: String, benchmark: String) {
exec.loadGenerationDelay = 0 exec.loadGenerationDelay = 0
exec.repetitions = 1 exec.repetitions = 1
exec.metric = "" exec.metric = ""
exec.strategy = strat exec.strategy = strategy
execution.benchmark = benchmark execution.benchmark = benchmark
execution.loads = loadType execution.load = loadType
execution.resources = resourceDef execution.resources = resourceDef
execution.slos = emptyList() execution.slos = emptyList()
execution.execution = exec execution.execution = exec
......
...@@ -5,7 +5,7 @@ metadata: ...@@ -5,7 +5,7 @@ metadata:
spec: spec:
name: test name: test
benchmark: "uc1-kstreams" benchmark: "uc1-kstreams"
loads: load:
loadType: "NumSensors" loadType: "NumSensors"
loadValues: [25000, 50000, 75000, 100000, 125000, 150000] loadValues: [25000, 50000, 75000, 100000, 125000, 150000]
resources: resources:
...@@ -13,11 +13,8 @@ spec: ...@@ -13,11 +13,8 @@ spec:
resourceValues: [1, 2, 3, 4, 5] resourceValues: [1, 2, 3, 4, 5]
slos: slos:
- name: "lag trend" - name: "lag trend"
properties:
threshold: 2000 threshold: 2000
prometheusUrl: "http://prometheus-operated:9090"
externalSloUrl: "http://localhost:80/evaluate-slope"
offset: 0
warmup: 60 # in seconds
execution: execution:
strategy: strategy:
name: "RestrictionSearch" name: "RestrictionSearch"
......
...@@ -5,7 +5,7 @@ metadata: ...@@ -5,7 +5,7 @@ metadata:
spec: spec:
name: test name: test
benchmark: "uc1-kstreams-update" benchmark: "uc1-kstreams-update"
loads: load:
loadType: "NumSensors" loadType: "NumSensors"
loadValues: [25000, 50000, 75000, 100000, 125000, 150000] loadValues: [25000, 50000, 75000, 100000, 125000, 150000]
resources: resources:
......
...@@ -5,7 +5,7 @@ metadata: ...@@ -5,7 +5,7 @@ metadata:
spec: spec:
name: test name: test
benchmark: "uc1-kstreams" benchmark: "uc1-kstreams"
loads: load:
loadType: "NumSensors" loadType: "NumSensors"
loadValues: [25000, 50000, 75000, 100000, 125000, 150000] loadValues: [25000, 50000, 75000, 100000, 125000, 150000]
resources: resources:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment