Skip to content
Snippets Groups Projects

Resolve "Implement Quarkus/Kotlin protype"

8 files
+ 24
32
Compare changes
  • Side-by-side
  • Inline
Files
8
package theodolite.execution
import mu.KotlinLogging
import theodolite.util.Benchmark
import theodolite.util.LoadDimension
import theodolite.util.Resource
import theodolite.util.Results
import java.time.Duration
private val logger = KotlinLogging.logger {}
class KafkaBenchmarkExecutor(benchmark: Benchmark, results: Results, executionDuration: Duration) : BenchmarkExecutor(benchmark, results, executionDuration) {
override fun runExperiment(load: LoadDimension, res: Resource): Boolean {
benchmark.start()
// wait
this.waitAndLog()
benchmark.stop()
// evaluate
val result = false // if success else false
// todo evaluate
val result = false // if success else falsew
this.results.setResult(Pair(load, res), result)
return result;
}
private fun waitAndLog() {
for (i in 1.rangeTo(executionDuration.toMinutes())) {
Thread.sleep(Duration.ofMinutes(1).toMillis())
logger.info { "Executed: $i minutes" }
}
}
}
\ No newline at end of file
Loading