This commit is contained in:
parent
afdd1ee4eb
commit
233b706d29
@ -26,12 +26,12 @@ fun Application.module(testing: Boolean = false) {
|
||||
val uploader = Uploader()
|
||||
val processResults = ProcessResults()
|
||||
environment.monitor.subscribe(ApplicationStarted) {
|
||||
val job = GlobalScope.launch {
|
||||
delay(3000L)
|
||||
println("Starting benchmark")
|
||||
startTime = Instant.now()
|
||||
while (elapsed < targetTime) {
|
||||
GlobalScope.launch {
|
||||
uploader.uploadData(currIter, gson, cachedFile)
|
||||
}
|
||||
currIter += 1
|
||||
currTimeStamp = Instant.now()
|
||||
timestamps[currIter] = currTimeStamp
|
||||
@ -40,7 +40,7 @@ fun Application.module(testing: Boolean = false) {
|
||||
println("Benchmark ended")
|
||||
processResults.mapToProcess = timestamps
|
||||
processResults.process()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user