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

Enhance logging

parent e8fc2ab5
No related branches found
No related tags found
3 merge requests!159Re-implementation of Theodolite with Kotlin/Quarkus,!157Update Graal Image in CI pipeline,!83WIP: Re-implementation of Theodolite with Kotlin/Quarkus
......@@ -30,7 +30,7 @@ def execute(results, threshold, warmup):
df = pd.DataFrame(d)
logger.info(df)
logger.info("Calculating trend slope for data frame:\n %s", df)
try:
trend_slope = trend_slope_computer.compute(df, warmup)
except Exception as e:
......
......@@ -55,7 +55,7 @@ class AnalysisExecutor(
)
} catch (e: Exception) {
logger.error { "Evaluation failed for resource: ${res.get()} and load: ${load.get()} error: $e" }
logger.error { "Evaluation failed for resource '${res.get()}' and load '${load.get()}'. Error: $e" }
}
return result
}
......
......@@ -29,7 +29,7 @@ class CsvExporter {
pw.println(it.joinToString())
}
}
logger.info { "Wrote csv file: $name to ${csvOutputFile.absolutePath}" }
logger.info { "Wrote CSV file: $name to ${csvOutputFile.absolutePath}." }
}
/**
......
......@@ -46,7 +46,7 @@ class ExternalSloChecker(
val result = post(externalSlopeURL, data = data, timeout = TIMEOUT)
if (result.statusCode != 200) {
counter++
logger.error { "Could not reach external slope analysis" }
logger.error { "Could not reach external SLO checker" }
} else {
val booleanResult = result.text.toBoolean()
logger.info { "SLO checker result is: $booleanResult" }
......@@ -54,6 +54,6 @@ class ExternalSloChecker(
}
}
throw ConnectException("Could not reach slope evaluation")
throw ConnectException("Could not reach external SLO checker")
}
}
......@@ -48,18 +48,18 @@ class MetricFetcher(private val prometheusURL: String, private val offset: Durat
val response = get("$prometheusURL/api/v1/query_range", params = parameter, timeout = TIMEOUT)
if (response.statusCode != 200) {
val message = response.jsonObject.toString()
logger.warn { "Could not connect to Prometheus: $message, retrying now" }
logger.warn { "Could not connect to Prometheus: $message. Retrying now." }
counter++
} else {
val values = parseValues(response)
if (values.data?.result.isNullOrEmpty()) {
logger.error { "Empty query result: $values between $start and $end for querry $query" }
logger.error { "Empty query result: $values between $start and $end for query $query." }
throw NoSuchFieldException()
}
return parseValues(response)
}
}
throw ConnectException("No answer from Prometheus received")
throw ConnectException("No answer from Prometheus received.")
}
/**
......
......@@ -47,7 +47,7 @@ abstract class BenchmarkExecutor(
*
*/
fun waitAndLog() {
logger.info { "Execution of a new benchmark started." }
logger.info { "Execution of a new experiment started." }
var secondsRunning = 0L
......
......@@ -30,7 +30,7 @@ class BenchmarkExecutorImpl(
benchmarkDeployment.setup()
this.waitAndLog()
} catch (e: Exception) {
logger.error { "Error while setup experiment." }
logger.error { "Error while setting up experiment with id ${this.executionId}." }
logger.error { "Error is: $e" }
this.run.set(false)
}
......@@ -51,8 +51,8 @@ class BenchmarkExecutorImpl(
try {
benchmarkDeployment.teardown()
} catch (e: Exception) {
logger.warn { "Error while teardown of deplyoment" }
logger.debug { "The Teardowm failed cause of: $e " }
logger.warn { "Error while tearing down the benchmark deployment." }
logger.debug { "Teardown failed, caused by: $e " }
}
return result
......
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