Skip to content

Commit 345580e

Browse files
authored
Improve Contest Estimator performance #1659 (#1662)
1 parent 5435ce3 commit 345580e

File tree

1 file changed

+7
-4
lines changed
  • utbot-junit-contest/src/main/kotlin/org/utbot/contest

1 file changed

+7
-4
lines changed

utbot-junit-contest/src/main/kotlin/org/utbot/contest/Contest.kt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ fun runGeneration(
197197
setOptions()
198198
//will not be executed in real contest
199199
logger.info().bracket("warmup: 1st optional soot initialization and executor warmup (not to be counted in time budget)") {
200-
TestCaseGenerator(listOf(cut.classfileDir.toPath()), classpathString, dependencyPath, JdkInfoService.provide())
200+
TestCaseGenerator(listOf(cut.classfileDir.toPath()), classpathString, dependencyPath, JdkInfoService.provide(), forceSootReload = false)
201201
}
202202
logger.info().bracket("warmup (first): kotlin reflection :: init") {
203203
prepareClass(ConcreteExecutorPool::class.java, "")
@@ -239,7 +239,7 @@ fun runGeneration(
239239

240240
val testCaseGenerator =
241241
logger.info().bracket("2nd optional soot initialization") {
242-
TestCaseGenerator(listOf(cut.classfileDir.toPath()), classpathString, dependencyPath, JdkInfoService.provide())
242+
TestCaseGenerator(listOf(cut.classfileDir.toPath()), classpathString, dependencyPath, JdkInfoService.provide(), forceSootReload = false)
243243
}
244244

245245

@@ -363,8 +363,11 @@ fun runGeneration(
363363
controller.job = job
364364

365365
//don't start other methods while last method still in progress
366-
while (job.isActive)
367-
yield()
366+
try {
367+
job.join()
368+
} catch (t: Throwable) {
369+
logger.error(t) { "Internal job error" }
370+
}
368371

369372
remainingMethodsCount--
370373
}

0 commit comments

Comments
 (0)