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

Add saving of benchmark configurations

parent 504ca268
No related branches found
No related tags found
4 merge requests!159Re-implementation of Theodolite with Kotlin/Quarkus,!157Update Graal Image in CI pipeline,!111Add prefix to output files to link results and experiment,!83WIP: Re-implementation of Theodolite with Kotlin/Quarkus
package theodolite.execution
import com.google.gson.GsonBuilder
import theodolite.benchmark.BenchmarkExecution
import theodolite.benchmark.KubernetesBenchmark
import theodolite.patcher.PatcherDefinitionFactory
......@@ -9,6 +10,7 @@ import theodolite.util.Config
import theodolite.util.LoadDimension
import theodolite.util.Resource
import theodolite.util.Results
import java.io.PrintWriter
import java.time.Duration
class TheodoliteExecutor(
......@@ -59,11 +61,22 @@ class TheodoliteExecutor(
}
fun run() {
saveConfiguration()
val config = buildConfig()
// execute benchmarks for each load
for (load in config.loads) {
config.compositeStrategy.findSuitableResource(load, config.resources)
}
}
fun saveConfiguration() {
val gson = GsonBuilder().setPrettyPrinting().create()
PrintWriter("${this.config.prefix}-execution-configuration").use { pw ->
pw.println(gson.toJson(this.config))
}
PrintWriter("${this.config.prefix}-benchmark-configuration").use { pw ->
pw.println(gson.toJson(kubernetesBenchmark))
}
}
}
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