Skip to content
Snippets Groups Projects
Commit cdc69c62 authored by Lorenz Boguhn's avatar Lorenz Boguhn Committed by Lorenz Boguhn
Browse files

Cleanup RETRYS

parent a55c10a9
No related branches found
No related tags found
4 merge requests!159Re-implementation of Theodolite with Kotlin/Quarkus,!157Update Graal Image in CI pipeline,!92Introduce experiment evaluation,!83WIP: Re-implementation of Theodolite with Kotlin/Quarkus
......@@ -16,7 +16,7 @@ class ExternalSloChecker(
) :
SloChecker {
private val RETRYS = 2
private val RETRIES = 2
private val TIMEOUT = 60.0
override fun evaluate(start: Instant, end: Instant): Boolean {
......@@ -26,7 +26,7 @@ class ExternalSloChecker(
val data =
Gson().toJson(mapOf("total_lag" to fetchedData.data?.result, "threshold" to threshold, "warmup" to warmup))
while (counter < RETRYS) {
while (counter < RETRIES) {
val result = post(externalSlopeURL, data = data, timeout = TIMEOUT)
if (result.statusCode != 200) {
counter++
......
......@@ -12,7 +12,7 @@ import java.time.Instant
private val logger = KotlinLogging.logger {}
class MetricFetcher(private val prometheusURL: String, private val offset: Duration) {
private val RETRYS = 2
private val RETRIES = 2
private val TIMEOUT = 60.0
fun fetchMetric(start: Instant, end: Instant, query: String): PrometheusResponse {
......@@ -28,7 +28,7 @@ class MetricFetcher(private val prometheusURL: String, private val offset: Durat
"step" to "5s"
)
while (counter < RETRYS) {
while (counter < RETRIES) {
val response = get("$prometheusURL/api/v1/query_range", params = parameter, timeout = TIMEOUT)
if (response.statusCode != 200) {
val message = response.jsonObject.toString()
......
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