diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2024-05-07 15:20:44 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-05-13 20:02:41 +0000 |
commit | 07d1d8cd3f8f95ac40022916717481b43727ec03 (patch) | |
tree | 751e6c1a15db1b3e15f32ca1c37d3237ed1b8da6 /sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java | |
parent | ff63883b5b6b1fc03f7395173ed45706df2b9d41 (diff) | |
download | sonarqube-07d1d8cd3f8f95ac40022916717481b43727ec03.tar.gz sonarqube-07d1d8cd3f8f95ac40022916717481b43727ec03.zip |
Log the max memory allocated to the scanner engine
Diffstat (limited to 'sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java')
-rw-r--r-- | sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java index b9de4071df2..9112b99c78b 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java @@ -23,6 +23,7 @@ import java.time.Clock; import java.util.List; import java.util.Map; import javax.annotation.Priority; +import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -67,6 +68,9 @@ public class SpringGlobalContainer extends SpringComponentContainer { } public static SpringGlobalContainer create(Map<String, String> scannerProperties, List<?> extensions) { + if (LOG.isDebugEnabled()) { + LOG.debug("JVM max available memory: {}", FileUtils.byteCountToDisplaySize(Runtime.getRuntime().maxMemory())); + } return new SpringGlobalContainer(scannerProperties, extensions); } |