querydsl-entityql icon indicating copy to clipboard operation
querydsl-entityql copied to clipboard

Benchmarks measure overhead of acquiring a connection or setting up EntityManager

Open lukaseder opened this issue 3 years ago • 1 comments

I came here from a reddit discussion: https://www.reddit.com/r/java/comments/o2z0yu/hibernate_community_performance_comparison_with/h2aqdjx?utm_source=share&utm_medium=web2x&context=3

I think these resource management lines should be moved out of the benchmark into the setup section:

https://github.com/eXsio/querydsl-entityql/blob/fb6155328fa0f6d571138076b30aab717a40e8d3/src/test/java/pl/exsio/querydsl/entityql/java/benchmark/execution/jdbc/JDBCQueryExecutionBenchmark.java#L39

https://github.com/eXsio/querydsl-entityql/blob/fb6155328fa0f6d571138076b30aab717a40e8d3/src/test/java/pl/exsio/querydsl/entityql/java/benchmark/execution/jpa/JpaJPQLQueryExecutionBenchmark.java#L34

Or, at least, create a separate benchmark that allows for seeing how much overhead is produced by this resource management.

I don't know your product, but I'm assuming this overhead is already being moved to the setup section when you measure your own product: https://github.com/eXsio/querydsl-entityql/blob/master/src/test/java/pl/exsio/querydsl/entityql/java/benchmark/execution/entityql/EntityQLDynamicQueryExecutionBenchmark.java

lukaseder avatar Jun 19 '21 10:06 lukaseder

Hi Lukas!

Thanks for noticing this, you are absolutely correct. I will update the benchmarks and post the new results.

eXsio avatar Jun 22 '21 21:06 eXsio