-
Notifications
You must be signed in to change notification settings - Fork 4
Fixing maximum heap size as a threshold test
The principle of a threshold test is to compare a value in the current build to a threshold. If this value exceeds the threshold, the test will fail and we are alerted of a possible performance degradation.
In this article, Martin Fowler gives the example of the amount of time taken by a test.
When you set maximum heap size for a test with the help of @HeapSize or @Xmx, the test may fail one day because of an OutOfMemoryError. You may consider this as a performance issue or if not increase maximum heap size. So, fixing maximum heap size could be seen as a threshold test. A significant increase of heap allocation may also lead to a significant increase of the test time length because of garbage collection activity. So your build duration could increase, possibly alerting you of a significant increase of heap allocation for a test. @ExpectNoJvmIssue can help you to check that most of the test time is spent to garbage collect objects.
π Β Core
π Β JVM
π Β SQL
π Β Scopes
π Β Create an annotation
π Β JUnit 4
π Β JUnit 5
π Β TestNG
π Β Spring
π Β Detect and fix N+1 SELECT
π Β Maven performance
π Β Spring Boot - JUnit 4
π Β Spring Boot - JUnit 5
π Β Micronaut Data - JUnit 5
π Β Micronaut - Spring - JUnit 5
π Β Quarkus - JUnit 5
π Β FAQ
π Β QuickPerf code