Hacker News new | ask | show | jobs
by frederikb 2028 days ago
I've only had a cursory glance at it but it looks interesting so far. I've had multiple teams struggle with N+1 and inadvertently caused queries with JPA in the past (although it was often related to their poor understanding of JPA itself). In any case I'm interested in any kind of tool which can help debug and prevent these kinds of issues.

So far I was investigating the use of Sniffy ( https://github.com/sniffy/sniffy ) which provides assertion capabilities on the number of queries during the runtime of a JUnit integration test. I'm pairing this with the rest of my JUnit 5 integration test stack (Test Containers, DBUnit, Database Rider and Flyway) which looks promising.

Unfortunately your tool seems to be closely coupled with Spring, correct? Is there a possibility of extracting some of the functionality to work independently of it? I'm thinking of JEE/MicroProfile/CDI based environments, e.g. Quarkus.

1 comments

Yes, currently jplusone requires Spring & Spring Boot to work, mainly because it significantly reduces effort needed to integrate the library into applications (adding dependency and enabling logger by developer is enough in most cases, the rest is handled by spring boot autoconfiguration), and minimizes the risk of wrong setup. I think with some minor changes it would be possible to allow using jplusone without spring. I'll try to add such option in future releases. Thank you for a good idea for an improvement.