melix / jmh-gradle-plugin

Integrates the JMH benchmarking framework with Gradle
Apache License 2.0
659 stars 88 forks source link

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

Open vedrancu opened 1 year ago

vedrancu commented 1 year ago

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?

melix commented 1 year ago

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:

vedrancu commented 1 year ago

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?