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