https://kotlinlang.org logo
Title
s

simon.vergauwen

11/16/2020, 4:29 PM
Hey everyone, Does anyone know if there is an easy way to profile how long tests take to run? I ran Gradle
--profile
, but that only shows the length of the whole suite. I'd like to generate a small report to see which tests take excessively long.
s

Srki Rakic

11/22/2020, 11:03 PM
Something like this may work
test {
  afterTest { descriptor, result ->
    def totalTime = result.endTime - result.startTime
    println "Total time of $descriptor.name was $totalTime"
  }
}
s

simon.vergauwen

11/23/2020, 7:55 AM
I need to run it on a couple of thousands of tests across several modules, actually still even using KotlinTest/Kotest :s Having a hard time migrating
s

sam

11/25/2020, 2:54 AM
What are you migrating to ?
s

simon.vergauwen

11/25/2020, 9:22 AM
We're still behind on KotlinTest for most of the Arrow codebase.
s

sam

11/25/2020, 11:35 AM
Ah ok.