From 9d5fdfbd39feac5d523733a151ee61fb1f82b6fa Mon Sep 17 00:00:00 2001
From: lorenz <stu203404@mail.uni-kiel.de>
Date: Thu, 9 Jun 2022 16:05:49 +0200
Subject: [PATCH] Adapt AnalysisExecutor to use slo names for experiment file
 name

---
 .../theodolite/kubernetes/slo/AnalysisExecutor.kt      | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/AnalysisExecutor.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/AnalysisExecutor.kt
index 5e5a09efb..96c5a43b8 100644
--- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/AnalysisExecutor.kt
+++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/AnalysisExecutor.kt
@@ -48,15 +48,9 @@ class AnalysisExecutor(
                     )
                 }
 
-            // set name if not defined in properties
-            var sloName = slo.properties["name"] ?: ""
-            if (sloName.length > 0){
-                sloName = "_" + sloName
-            }
-
-            prometheusData.forEachIndexed{ index, data ->
+            prometheusData.forEach{ data ->
                 ioHandler.writeToCSVFile(
-                    fileURL = "${fileURL}_${index}${sloName}_${repetitionCounter++}",
+                    fileURL = "${fileURL}_${slo.name}_${repetitionCounter++}",
                     data = data.getResultAsList(),
                     columns = listOf("labels", "timestamp", "value")
                 )
-- 
GitLab