|
|
|
|
|
by adgadev
2027 days ago
|
|
Creator here. As a developer, while working on performance optimisations on microservice with complex domain modeled in JPA, I struggled a lot with investigating why there are
dozens of various SQL triggered by each service call, and what exact place in code is responsible for triggering them. I needed those information to choose and apply optimisation strategy i.e. detect N+1 SELECT problem and extend other query with one more JOIN. It was cumbersome task since there was no easy way to do that, only SQL logs generated by Hibernate with no context, just timestamps. Moreover each new feature can silently break those optimisations. That's why I decided to write JPlusOne open surce library which would help with easy finding origin and context of JPA issued SQL statements. JPlusOne can generate report for each integration test containing complete tree of JPA persistence related activity or just situations when i.e. lazy loading is occurring, potentially leading to N+1 SELECT problem. Moreover JPlusOne provides API which allows to write tests checking how effectively, from performance point of view, your application is using JPA in context of some business operation (i.e. assert amount of lazy loading operations, or SQL statements in general). I hope you find it useful. Any feedback will be appreciated. Thanks. |
|