adessoSE / junit-insights

Extension for JUnit which provides insights for the runtime of contexts, classes and methods
MIT License
146 stars 16 forks source link

Differentiate between time spent on Spring related actions and the rest #15

Open florianluediger opened 6 years ago

florianluediger commented 6 years ago

Currently the time spent on Spring related actions is calculated as follows:

Spring time = total time - test time

This way, all the time spent on other things that are not necessarily Spring related is included in this time.

silasmahler commented 6 years ago

We need to investigate if there are more lifecyclehooks or options to determine the time. Maybe we can ask someone from the JUnit5-Team in this regard.

florianluediger commented 6 years ago

When starting a spring context with Spring Boot, there is a log output saying "XyContext: initialization completed in 4711 ms" If we find this in the spring boot code, we might be able to extract this information the same way that Spring Boot does.

florianluediger commented 6 years ago

Spring boot is not actually responsible for this log output, because it comes from the ContextLoader from the core spring framework and there does not seem to be a way to extract that information in the same way.