tkvangorder / spring-test-profiling

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overview

This is a sandbox for experimenting with Spring Test adding micrometer to measure various aspects of the framework.

The initial version of this project was to measure how much overhead adding @Transactional to your test. This was done by adding micrometer timers in a customer version of the TestContextManager and then bootstrapping that manager rather than the default.

To get this working:

  1. you need to start up the docker container for MS SQL Server via docker-compose up

  2. Run the non-transactional integration tests, these do not have the @Transactional annotation.

  3. After running the tests, a report will be printed to show the times spend within each Listener. Note the 'beforeTestMethod' and 'afterTestMethod' restuls for the TransactionalTestExecutionListener

  4. Run the transactional integration tests,these have the @Transactional annotation.

  5. After running the tests, a report will be printed to show the times spend within each Listener. Note the 'beforeTestMethod' and 'afterTestMethod' restuls for the TransactionalTestExecutionListener is significantly larger.

About


Languages

Language:Java 100.0%