diff --git a/theodolite-quarkus/config/example-benchmark-yaml-resource.yaml b/theodolite-quarkus/config/example-benchmark-yaml-resource.yaml index 42b1cd08dc1949355c97edebc92ea7b5ab8799b2..4d3d6ef395fb2c3fda2154aef2bf5f9ffb1c0ed7 100644 --- a/theodolite-quarkus/config/example-benchmark-yaml-resource.yaml +++ b/theodolite-quarkus/config/example-benchmark-yaml-resource.yaml @@ -20,7 +20,7 @@ loadTypes: container: "workload-generator" variableName: "NUM_SENSORS" kafkaConfig: - bootstrapServer: "my-confluent-cp-kafka:9092" + bootstrapServer: "localhost:31290" # "my-confluent-cp-kafka:9092" topics: - name: "input" numPartitions: 40 diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/evaluation/AnalysisExecutor.kt b/theodolite-quarkus/src/main/kotlin/theodolite/evaluation/AnalysisExecutor.kt index bb2dc7ed81dbc0b4cb31963aba4f7ca2dd420ca3..5916e10c36e27fbcf48082fa75eb7d69335ec864 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/evaluation/AnalysisExecutor.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/evaluation/AnalysisExecutor.kt @@ -22,6 +22,8 @@ class AnalysisExecutor(private val slo: BenchmarkExecution.Slo) { val prometheusData = executionIntervals.map { interval -> fetcher.fetchMetric( start = interval.first, end = interval.second, query = "sum by(group)(kafka_consumergroup_group_lag >= 0)") } var repetitionCounter = 0 prometheusData.forEach{ data -> exporter.toCsv(name = "${load.get()}_${res.get()}_${slo.sloType}_rep_${repetitionCounter++}", prom = data) } + prometheusData.forEach { logger.info { "prom-data: $it" }} + try { val sloChecker = SloCheckerFactory().create( diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/evaluation/ExternalSloChecker.kt b/theodolite-quarkus/src/main/kotlin/theodolite/evaluation/ExternalSloChecker.kt index 74a121e41369dc952ef954c5c39878b9d738f2f6..211117ade66f53414246e8af3187a047ce82b15f 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/evaluation/ExternalSloChecker.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/evaluation/ExternalSloChecker.kt @@ -26,6 +26,7 @@ class ExternalSloChecker( requestData.add(mapOf("warmup" to warmup).toString()) + while (counter < RETRIES) { val result = post(externalSlopeURL, data = requestData, timeout = TIMEOUT) if (result.statusCode != 200) { diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/execution/BenchmarkExecutorImpl.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/BenchmarkExecutorImpl.kt index 9750558fe739b8dbbeee0cd50181cd7346202b16..3b21886f05faa1bc4f75dba39c72e84e006ec693 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/execution/BenchmarkExecutorImpl.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/BenchmarkExecutorImpl.kt @@ -23,16 +23,19 @@ class BenchmarkExecutorImpl( override fun runExperiment(load: LoadDimension, res: Resource): Boolean { var result = false val executionIntervals: MutableList<Pair<Instant, Instant>> = ArrayList(repetitions) - executionIntervals + for (i in 1.rangeTo(repetitions)) { if (this.run.get()) { executionIntervals.add(runSingleExperiment(load,res)) + } else { + break } } if (this.run.get()) { - result = - AnalysisExecutor(slo = slo).analyze(load = load, res = res, executionIntervals = executionIntervals) + executionIntervals.forEach{ logger.info { "interval for evaluation; from: ${it.first}, to: ${it.second}"}} + result =AnalysisExecutor(slo = slo) + .analyze(load = load, res = res, executionIntervals = executionIntervals) this.results.setResult(Pair(load, res), result) } return result diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteYamlExecutor.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteYamlExecutor.kt index 6bddea20c05fb5c0eb6a5a3bd60b3ec2c6b9bd5d..cfd49eb83e6885118dd1e18604954e980686aea9 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteYamlExecutor.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteYamlExecutor.kt @@ -15,8 +15,8 @@ class TheodoliteYamlExecutor { fun start() { logger.info { "Theodolite started" } - val executionPath = System.getenv("THEODOLITE_EXECUTION") ?: "./config/BenchmarkExecution.yaml" - val benchmarkPath = System.getenv("THEODOLITE_BENCHMARK") ?: "./config/BenchmarkType.yaml" + val executionPath = System.getenv("THEODOLITE_EXECUTION") ?: "./config/example-execution-yaml-resource.yaml" + val benchmarkPath = System.getenv("THEODOLITE_BENCHMARK") ?: "./config/example-benchmark-yaml-resource.yaml" logger.info { "Using $executionPath for BenchmarkExecution" } logger.info { "Using $benchmarkPath for BenchmarkType" }