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

Add slo index + underscore for csv writer

parent 8ce6aa08
No related branches found
No related tags found
1 merge request!274Feature/381 get multiple slo results
Pipeline #8359 passed
...@@ -50,11 +50,15 @@ class AnalysisExecutor( ...@@ -50,11 +50,15 @@ class AnalysisExecutor(
) )
} }
val sloName = slo.properties["name"] ?: "" // set name if not defined in properties
var sloName = slo.properties["name"] ?: ""
if (sloName.length > 0){
sloName = "_" + sloName
}
prometheusData.forEach { data -> prometheusData.forEachIndexed{ index, data ->
ioHandler.writeToCSVFile( ioHandler.writeToCSVFile(
fileURL = "${fileURL}_${sloName}_${repetitionCounter++}", fileURL = "${fileURL}_${index}${sloName}_${repetitionCounter++}",
data = data.getResultAsList(), data = data.getResultAsList(),
columns = listOf("labels", "timestamp", "value") columns = listOf("labels", "timestamp", "value")
) )
......
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