Skip to content
Snippets Groups Projects
Commit ec4d5bf1 authored by Benedikt Wetzel's avatar Benedikt Wetzel
Browse files

Resolve merge conflicts, update from lag trend percentages to ratio

parents f632d24b f8211093
No related branches found
No related tags found
1 merge request!180Make the analysis of experiments more flexible
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
RELEASE_NAME=$1 # Supposed to be equal to tag, e.g., v0.3.0 RELEASE_NAME=$1 # Supposed to be equal to tag, e.g., v0.3.0
RELEASE_PATH="https://github.com/cau-se/theodolite/releases/download" RELEASE_PATH="https://github.com/cau-se/theodolite/releases/download"
REPO_INDEX="../../docs/index.yaml" REPO_INDEX="../docs/index.yaml"
helm repo index . --url $RELEASE_PATH/$RELEASE_NAME --merge $REPO_INDEX && \ helm repo index . --url $RELEASE_PATH/$RELEASE_NAME --merge $REPO_INDEX && \
mv index.yaml $REPO_INDEX mv index.yaml $REPO_INDEX
\ No newline at end of file
...@@ -250,11 +250,6 @@ operator: ...@@ -250,11 +250,6 @@ operator:
imageTag: latest imageTag: latest
imagePullPolicy: Always imagePullPolicy: Always
executionCRD:
create: true
benchmarkCRD:
create: true
sloChecker: sloChecker:
lagTrend: lagTrend:
enabled: true enabled: true
...@@ -281,6 +276,9 @@ rbac: ...@@ -281,6 +276,9 @@ rbac:
randomScheduler: randomScheduler:
enabled: true enabled: true
image: ghcr.io/cau-se/theodolite-random-scheduler
imageTag: latest
imagePullPolicy: Always
rbac: rbac:
create: true create: true
serviceAccount: serviceAccount:
......
...@@ -7,6 +7,9 @@ repositories { ...@@ -7,6 +7,9 @@ repositories {
maven { maven {
url "https://oss.sonatype.org/content/repositories/snapshots/" url "https://oss.sonatype.org/content/repositories/snapshots/"
} }
maven {
url 'https://packages.confluent.io/maven/'
}
} }
dependencies { dependencies {
......
...@@ -118,7 +118,7 @@ spec: ...@@ -118,7 +118,7 @@ spec:
minItems: 1 minItems: 1
items: items:
type: object type: object
required: ["name", "numPartitions", "replicationFactor"] required: ["name"]
properties: properties:
name: name:
description: The name of the topic. description: The name of the topic.
......
...@@ -22,13 +22,13 @@ class SloCheckerFactory { ...@@ -22,13 +22,13 @@ class SloCheckerFactory {
* - `warmup`: time from the beginning to skip in the analysis. * - `warmup`: time from the beginning to skip in the analysis.
* *
* *
* ### `lag trend percent` * ### `lag trend ratio`
* Creates an [ExternalSloChecker] with defined parameters. * Creates an [ExternalSloChecker] with defined parameters.
* The required threshold is computed using a percentage and the load of the experiment. * The required threshold is computed using a ratio and the load of the experiment.
* *
* The properties map needs the following fields: * The properties map needs the following fields:
* - `externalSlopeURL`: Url to the concrete SLO checker service. * - `externalSlopeURL`: Url to the concrete SLO checker service.
* - `percent`: of the executed load that is accepted for the slope. * - `ratio`: of the executed load that is accepted for the slope.
* - `warmup`: time from the beginning to skip in the analysis. * - `warmup`: time from the beginning to skip in the analysis.
* *
* @param sloType Type of the [SloChecker]. * @param sloType Type of the [SloChecker].
...@@ -50,18 +50,16 @@ class SloCheckerFactory { ...@@ -50,18 +50,16 @@ class SloCheckerFactory {
threshold = properties["threshold"]?.toInt() ?: throw IllegalArgumentException("threshold expected"), threshold = properties["threshold"]?.toInt() ?: throw IllegalArgumentException("threshold expected"),
warmup = properties["warmup"]?.toInt() ?: throw IllegalArgumentException("warmup expected") warmup = properties["warmup"]?.toInt() ?: throw IllegalArgumentException("warmup expected")
) )
SloTypes.LAG_TREND_PERCENTAGE.value, SloTypes.DROPPED_RECORDS_PERCENTAGE.value -> {
if (!properties["loadType"].equals("NumSensors")) { SloTypes.LAG_TREND_RATIO.value, SloTypes.DROPPED_RECORDS_RATIO.value -> {
throw IllegalArgumentException("Percent Threshold is only allowed with load type NumSensors") val thresholdRatio =
} properties["ratio"]?.toDouble()
val thresholdPercent = ?: throw IllegalArgumentException("ratio for threshold expected")
properties["percent"]?.toDouble() if (thresholdRatio < 0.0) {
?: throw IllegalArgumentException("percent for threshold expected") throw IllegalArgumentException("Threshold ratio needs to be an Double greater or equal 0.0")
if (thresholdPercent < 0.0 || thresholdPercent > 1.0) {
throw IllegalArgumentException("Threshold percent need to be an Double in the range between 0.0 and 1.0 (inclusive)")
} }
// cast to int, as rounding is not really necessary // cast to int, as rounding is not really necessary
val threshold = (load.get() * thresholdPercent).toInt() val threshold = (load.get() * thresholdRatio).toInt()
ExternalSloChecker( ExternalSloChecker(
externalSlopeURL = properties["externalSloUrl"] externalSlopeURL = properties["externalSloUrl"]
......
...@@ -8,8 +8,8 @@ class SloConfigHandler() { ...@@ -8,8 +8,8 @@ class SloConfigHandler() {
companion object { companion object {
fun getQueryString(sloType: String): String { fun getQueryString(sloType: String): String {
return when (sloType.toLowerCase()) { return when (sloType.toLowerCase()) {
SloTypes.LAG_TREND.value, SloTypes.LAG_TREND_PERCENTAGE.value -> "sum by(group)(kafka_consumergroup_group_lag >= 0)" SloTypes.LAG_TREND.value, SloTypes.LAG_TREND_RATIO.value -> "sum by(group)(kafka_consumergroup_group_lag >= 0)"
SloTypes.DROPPED_RECORDS.value, SloTypes.DROPPED_RECORDS_PERCENTAGE.value -> "sum by(job) (kafka_streams_stream_task_metrics_dropped_records_total>=0)" SloTypes.DROPPED_RECORDS.value, SloTypes.DROPPED_RECORDS_RATIO.value -> "sum by(job) (kafka_streams_stream_task_metrics_dropped_records_total>=0)"
else -> throw InvalidPatcherConfigurationException("Could not find Prometheus query string for slo type $sloType") else -> throw InvalidPatcherConfigurationException("Could not find Prometheus query string for slo type $sloType")
} }
} }
......
...@@ -2,9 +2,9 @@ package theodolite.evaluation ...@@ -2,9 +2,9 @@ package theodolite.evaluation
enum class SloTypes(val value: String) { enum class SloTypes(val value: String) {
LAG_TREND("lag trend"), LAG_TREND("lag trend"),
LAG_TREND_PERCENTAGE("lag trend percentage"), LAG_TREND_RATIO("lag trend ratio"),
DROPPED_RECORDS("dropped records"), DROPPED_RECORDS("dropped records"),
DROPPED_RECORDS_PERCENTAGE("dropped records percentage") DROPPED_RECORDS_RATIO("dropped records ratio")
} }
\ No newline at end of file
...@@ -55,9 +55,6 @@ class TheodoliteExecutor( ...@@ -55,9 +55,6 @@ class TheodoliteExecutor(
this.kubernetesBenchmark.loadTypes this.kubernetesBenchmark.loadTypes
) )
// Add load type to check if the percentage lag trend is applicable
config.slos.forEach { it.properties["loadType"] = config.load.loadType }
executor = executor =
BenchmarkExecutorImpl( BenchmarkExecutorImpl(
benchmark = kubernetesBenchmark, benchmark = kubernetesBenchmark,
...@@ -118,10 +115,10 @@ class TheodoliteExecutor( ...@@ -118,10 +115,10 @@ class TheodoliteExecutor(
val ioHandler = IOHandler() val ioHandler = IOHandler()
val resultsFolder = ioHandler.getResultFolderURL() val resultsFolder = ioHandler.getResultFolderURL()
this.config.executionId = getAndIncrementExecutionID(resultsFolder + "expID.txt") this.config.executionId = getAndIncrementExecutionID(resultsFolder + "expID.txt")
ioHandler.writeToJSONFile(this.config, "$resultsFolder${this.config.executionId}-execution-configuration") ioHandler.writeToJSONFile(this.config, "${resultsFolder}exp${this.config.executionId}-execution-configuration")
ioHandler.writeToJSONFile( ioHandler.writeToJSONFile(
kubernetesBenchmark, kubernetesBenchmark,
"$resultsFolder${this.config.executionId}-benchmark-configuration" "${resultsFolder}exp${this.config.executionId}-benchmark-configuration"
) )
val config = buildConfig() val config = buildConfig()
...@@ -133,7 +130,7 @@ class TheodoliteExecutor( ...@@ -133,7 +130,7 @@ class TheodoliteExecutor(
} }
ioHandler.writeToJSONFile( ioHandler.writeToJSONFile(
config.compositeStrategy.benchmarkExecutor.results, config.compositeStrategy.benchmarkExecutor.results,
"$resultsFolder${this.config.executionId}-result" "${resultsFolder}exp${this.config.executionId}-result"
) )
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment