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

Comments and Clean-up

parent c993e3b0
Branches
Tags
1 merge request!215Redesign Strategy, Load, and Resources data types
...@@ -7,8 +7,8 @@ import theodolite.strategies.searchstrategy.SearchStrategy ...@@ -7,8 +7,8 @@ import theodolite.strategies.searchstrategy.SearchStrategy
/** /**
* Config class that represents a configuration of a theodolite run. * Config class that represents a configuration of a theodolite run.
* *
* @param loads the LoadDimension of the execution * @param loads the possible loads of the execution
* @param resources the Resource of the execution * @param resources the possible resources of the execution
* @param searchStrategy the [SearchStrategy] of the execution * @param searchStrategy the [SearchStrategy] of the execution
* @param metric the Metric of the execution * @param metric the Metric of the execution
*/ */
......
...@@ -10,8 +10,6 @@ import theodolite.strategies.Metric ...@@ -10,8 +10,6 @@ import theodolite.strategies.Metric
*/ */
@RegisterForReflection @RegisterForReflection
class Results (val metric: Metric) { class Results (val metric: Metric) {
//TODO: enum statt Boolean für successful
// (load, resource) -> Boolean map // (load, resource) -> Boolean map
private val results: MutableMap<Pair<Int, Int>, Boolean> = mutableMapOf() private val results: MutableMap<Pair<Int, Int>, Boolean> = mutableMapOf()
......
...@@ -8,7 +8,7 @@ import theodolite.strategies.searchstrategy.InitialGuessSearchStrategy ...@@ -8,7 +8,7 @@ import theodolite.strategies.searchstrategy.InitialGuessSearchStrategy
import theodolite.strategies.Metric import theodolite.strategies.Metric
import theodolite.util.Results import theodolite.util.Results
import mu.KotlinLogging import mu.KotlinLogging
import theodolite.strategies.searchstrategy.PrevResourceMinGuess import theodolite.strategies.searchstrategy.PrevInstanceOptGuess
private val logger = KotlinLogging.logger {} private val logger = KotlinLogging.logger {}
...@@ -30,7 +30,7 @@ class InitialGuessSearchStrategyTest { ...@@ -30,7 +30,7 @@ class InitialGuessSearchStrategyTest {
val mockResources: List<Int> = (0..6).toList() val mockResources: List<Int> = (0..6).toList()
val results = Results(Metric.from("demand")) val results = Results(Metric.from("demand"))
val benchmark = TestBenchmark() val benchmark = TestBenchmark()
val guessStrategy = PrevResourceMinGuess() val guessStrategy = PrevInstanceOptGuess()
val sloChecker: BenchmarkExecution.Slo = BenchmarkExecution.Slo() val sloChecker: BenchmarkExecution.Slo = BenchmarkExecution.Slo()
val benchmarkExecutor = TestBenchmarkExecutorImpl(mockResults, benchmark, results, listOf(sloChecker), 0, 0, 5) val benchmarkExecutor = TestBenchmarkExecutorImpl(mockResults, benchmark, results, listOf(sloChecker), 0, 0, 5)
val strategy = InitialGuessSearchStrategy(benchmarkExecutor,guessStrategy, results) val strategy = InitialGuessSearchStrategy(benchmarkExecutor,guessStrategy, results)
...@@ -68,7 +68,7 @@ class InitialGuessSearchStrategyTest { ...@@ -68,7 +68,7 @@ class InitialGuessSearchStrategyTest {
val mockResources: List<Int> = (0..6).toList() val mockResources: List<Int> = (0..6).toList()
val results = Results(Metric.from("demand")) val results = Results(Metric.from("demand"))
val benchmark = TestBenchmark() val benchmark = TestBenchmark()
val guessStrategy = PrevResourceMinGuess() val guessStrategy = PrevInstanceOptGuess()
val sloChecker: BenchmarkExecution.Slo = BenchmarkExecution.Slo() val sloChecker: BenchmarkExecution.Slo = BenchmarkExecution.Slo()
val benchmarkExecutor = TestBenchmarkExecutorImpl(mockResults, benchmark, results, listOf(sloChecker), 0, 0, 5) val benchmarkExecutor = TestBenchmarkExecutorImpl(mockResults, benchmark, results, listOf(sloChecker), 0, 0, 5)
val strategy = InitialGuessSearchStrategy(benchmarkExecutor,guessStrategy, results) val strategy = InitialGuessSearchStrategy(benchmarkExecutor,guessStrategy, results)
...@@ -106,7 +106,7 @@ class InitialGuessSearchStrategyTest { ...@@ -106,7 +106,7 @@ class InitialGuessSearchStrategyTest {
val mockResources: List<Int> = (0..6).toList() val mockResources: List<Int> = (0..6).toList()
val results = Results(Metric.from("demand")) val results = Results(Metric.from("demand"))
val benchmark = TestBenchmark() val benchmark = TestBenchmark()
val guessStrategy = PrevResourceMinGuess() val guessStrategy = PrevInstanceOptGuess()
val sloChecker: BenchmarkExecution.Slo = BenchmarkExecution.Slo() val sloChecker: BenchmarkExecution.Slo = BenchmarkExecution.Slo()
val benchmarkExecutor = TestBenchmarkExecutorImpl(mockResults, benchmark, results, listOf(sloChecker), 0, 0, 5) val benchmarkExecutor = TestBenchmarkExecutorImpl(mockResults, benchmark, results, listOf(sloChecker), 0, 0, 5)
val strategy = InitialGuessSearchStrategy(benchmarkExecutor, guessStrategy, results) val strategy = InitialGuessSearchStrategy(benchmarkExecutor, guessStrategy, results)
......
...@@ -53,7 +53,7 @@ class ExecutionCRDummy(name: String, benchmark: String) { ...@@ -53,7 +53,7 @@ class ExecutionCRDummy(name: String, benchmark: String) {
execution.benchmark = benchmark execution.benchmark = benchmark
execution.load = loadType execution.loads = loadType
execution.resources = resourceDef execution.resources = resourceDef
execution.slos = emptyList() execution.slos = emptyList()
execution.execution = exec execution.execution = exec
......
...@@ -3,7 +3,6 @@ package theodolite.util ...@@ -3,7 +3,6 @@ package theodolite.util
import io.quarkus.test.junit.QuarkusTest import io.quarkus.test.junit.QuarkusTest
import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Assertions.assertNotNull import org.junit.jupiter.api.Assertions.assertNotNull
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test import org.junit.jupiter.api.Test
import theodolite.strategies.Metric import theodolite.strategies.Metric
......
...@@ -5,7 +5,7 @@ metadata: ...@@ -5,7 +5,7 @@ metadata:
spec: spec:
name: test name: test
benchmark: "uc1-kstreams" benchmark: "uc1-kstreams"
load: loads:
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-update" benchmark: "uc1-kstreams-update"
load: loads:
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"
load: loads:
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