Skip to content
Snippets Groups Projects
Commit 33524079 authored by Marcel Samir Becker's avatar Marcel Samir Becker
Browse files

Fixed execution yaml definition issues

parent 7b4e64df
No related branches found
No related tags found
1 merge request!215Redesign Strategy, Load, and Resources data types
...@@ -80,31 +80,37 @@ spec: ...@@ -80,31 +80,37 @@ spec:
execution: # def execution config execution: # def execution config
description: Defines the overall parameter for the execution. description: Defines the overall parameter for the execution.
type: object type: object
required: ["strategy", "duration", "repetitions", "restrictions"] required: ["strategy", "duration", "repetitions"]
properties: properties:
metric: metric:
default: "demand"
type: string type: string
oneOf: # default: "demand"
- "demand" # oneOf:
- "capacity" # - "demand"
# - "capacity"
strategy: strategy:
description: Defines the used strategy for the execution, either 'LinearSearch', 'BinarySearch' or 'InitialGuessSearch' description: Defines the used strategy for the execution, either 'LinearSearch', 'BinarySearch' or 'InitialGuessSearch'
type: object type: object
name: string required: ["name"]
properties: properties:
name:
type: string
#properties:
# type: object
restrictions: restrictions:
description: List of restriction strategies used to delimit the search space. description: List of restriction strategies used to delimit the search space.
type: array type: array
items: items:
type: string type: string
guessStrategy: string guessStrategy:
searchStrategy: string type: string
searchStrategy:
type: string
duration: duration:
description: Defines the duration of each experiment in seconds. description: Defines the duration of each experiment in seconds.
type: integer type: integer
repetitions: repetitions:
description: Numper of repititions for each experiments. description: Number of repititions for each experiments.
type: integer type: integer
loadGenerationDelay: loadGenerationDelay:
description: Seconds to wait between the start of the SUT and the load generator. description: Seconds to wait between the start of the SUT and the load generator.
......
...@@ -41,7 +41,7 @@ class BenchmarkExecution : KubernetesResource { ...@@ -41,7 +41,7 @@ class BenchmarkExecution : KubernetesResource {
@JsonDeserialize @JsonDeserialize
@RegisterForReflection @RegisterForReflection
class Execution : KubernetesResource { class Execution : KubernetesResource {
lateinit var metric: String var metric = "demand" //irgendwie mag er es nicht mit den default laden, wenn lateinit dann gibt es bei den tests fehler und muss bei var setzen
lateinit var strategy: Strategy lateinit var strategy: Strategy
var duration by Delegates.notNull<Long>() var duration by Delegates.notNull<Long>()
var repetitions by Delegates.notNull<Int>() var repetitions by Delegates.notNull<Int>()
...@@ -56,9 +56,9 @@ class BenchmarkExecution : KubernetesResource { ...@@ -56,9 +56,9 @@ class BenchmarkExecution : KubernetesResource {
@RegisterForReflection @RegisterForReflection
class Strategy : KubernetesResource { class Strategy : KubernetesResource {
lateinit var name: String lateinit var name: String
lateinit var restrictions: List<String> var restrictions = emptyList<String>()
lateinit var guessStrategy: String var guessStrategy = ""
lateinit var searchStrategy: String var searchStrategy = ""
} }
/** /**
......
...@@ -24,23 +24,6 @@ internal class ResultsTest { ...@@ -24,23 +24,6 @@ internal class ResultsTest {
assertEquals(2, minRequiredInstances) assertEquals(2, minRequiredInstances)
} }
@Test
@Disabled
// TODO necessary?
fun testMinRequiredInstancesWhenNotSuccessful() {
// This test is currently not implemented this way, but might later be the desired behavior.
val results = Results(Metric.from("demand"))
results.setResult(Pair(10000, 1), true)
results.setResult(Pair(10000, 2), true)
results.setResult(Pair(20000, 1), false)
results.setResult(Pair(20000, 2), false)
val minRequiredInstances = results.getOptYDimensionValue(20000)
assertNotNull(minRequiredInstances)
assertEquals(2, minRequiredInstances!!)
}
@Test @Test
fun testGetMaxBenchmarkedLoadWhenAllSuccessfulDemand() { fun testGetMaxBenchmarkedLoadWhenAllSuccessfulDemand() {
val results = Results(Metric.from("demand")) val results = Results(Metric.from("demand"))
......
...@@ -19,10 +19,11 @@ spec: ...@@ -19,10 +19,11 @@ spec:
offset: 0 offset: 0
warmup: 60 # in seconds warmup: 60 # in seconds
execution: execution:
strategy: "LinearSearch" name: "RestrictionSearch"
restrictions:
- "LowerBound"
searchStrategy: "LinearSearch"
duration: 300 # in seconds duration: 300 # in seconds
repetitions: 1 repetitions: 1
loadGenerationDelay: 30 # in seconds loadGenerationDelay: 30 # in seconds
restrictions:
- "LowerBound"
configOverrides: [] configOverrides: []
...@@ -20,10 +20,12 @@ spec: ...@@ -20,10 +20,12 @@ spec:
externalSloUrl: "http://localhost:80/evaluate-slope" externalSloUrl: "http://localhost:80/evaluate-slope"
warmup: 60 # in seconds warmup: 60 # in seconds
execution: execution:
strategy: "LinearSearch" strategy:
name: "RestrictionSearch"
restrictions:
- "LowerBound"
searchStrategy: "LinearSearch"
duration: 300 # in seconds duration: 300 # in seconds
repetitions: 1 repetitions: 1
loadGenerationDelay: 30 # in seconds loadGenerationDelay: 30 # in seconds
restrictions:
- "LowerBound"
configOverrides: [] configOverrides: []
...@@ -20,14 +20,12 @@ spec: ...@@ -20,14 +20,12 @@ spec:
externalSloUrl: "http://localhost:80/evaluate-slope" externalSloUrl: "http://localhost:80/evaluate-slope"
warmup: 60 # in seconds warmup: 60 # in seconds
execution: execution:
metric: "demand" strategy:
strategy: "RestrictionSearch" name: "RestrictionSearch"
properties: restrictions:
restrictions: - "LowerBound"
- "LowerBound" searchStrategy: "LinearSearch"
searchStrategy: "LinearSearch"
duration: 300 # in seconds duration: 300 # in seconds
repetitions: 1 repetitions: 1
loadGenerationDelay: 30 # in seconds loadGenerationDelay: 30 # in seconds
configOverrides: [] configOverrides: []
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