Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vedrancu opened this issue Dec 4, 2022 · 3 comments
Open

Comments

@vedrancu
Copy link

vedrancu commented Dec 4, 2022

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 vedrancu changed the title too many logs to console bring to out of JVM memory too many logs to console when running JMH bring to out of JVM memory Dec 4, 2022
@melix
Copy link
Owner

melix commented Dec 5, 2022

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) 🤔

@vedrancu
Copy link
Author

vedrancu commented Dec 5, 2022

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?

@Doohwancho
Copy link

this is link to how I solved this problem.

#106 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants