jmh-gradle-plugin icon indicating copy to clipboard operation
jmh-gradle-plugin copied to clipboard

too many logs to console when running JMH bring to out of JVM memory

Open vedrancu opened this issue 2 years ago • 2 comments

Hello team,

I testing my app using JMH gradle plugin. Inside my tested app there is log.info (...) commands. When I run JMH in gradle using ./gradlew jmh or ./gradlew -w jmh there are enormous logs writting to console output, it takes a lot time and, in the end, it failures with exception: Gradle build daemon has been stopped: JVM garbage collector thrashing and after running out of JVM memory

How can logging to console be suppressed to not affect JMH runs?

vedrancu avatar Dec 04 '22 23:12 vedrancu

The plugin itself doesn't set the log level. Whatever log framework you are using should work as long as it is configured properly (e.g logback.xml on classpath) :thinking:

melix avatar Dec 05 '22 09:12 melix

Hello @melix thank you for reply.

  1. do you know why having log.info() in tested code dramatically drop performance results when running gradle JMH?

  2. how JMH avoid/mitigate impact of all the other processes running in the same system and using CPU and RAM on the local machine?

vedrancu avatar Dec 05 '22 09:12 vedrancu