We do have a Scala-Sbt-Project with a lot subprojects.
Usually, we call the compile
or test
task on the root (aggregate).
I am searching for a way, how to get an overview for the used time of the tasks for each subproject.
Because (especially the tests) are to too slow (4,5 hours), I want to see, which subprojects are so slow. I am interested especially in the compile an test phase. Does anybody have a hint?
Is there a hidden functionality in sbt or in scalatest, or is there a good plugin anywhere to find out where all the time got eaten?
Would be really nice to have an overview with the used time after all projects finished the task.
Try configuring reporter to show test duration with D
flag, for example
Test / testOptions += Tests.Argument("-oD")
prints using standard output reporter
[info] ExampleSpec:
[info] The config map
[info] - should contain target directory used by sbt (18 milliseconds)
Note the (18 milliseconds)
.
Also consider How to profile the time spent for a task in SBT. For example, in the project root create .jvmopts
file with entry
-Dsbt.task.timings=true