[Minor] Garbage collect after startup

This allows us to see the memory usage after startup
This commit is contained in:
Robert von Burg 2022-09-06 13:10:04 +02:00
parent f888e5cd1c
commit 6764ae13d2
Signed by: eitch
GPG Key ID: 75DB9C85C74331F7
1 changed files with 2 additions and 1 deletions

View File

@ -40,7 +40,6 @@ import li.strolch.runtime.configuration.StrolchConfigurationException;
import li.strolch.runtime.privilege.PrivilegeHandler;
import li.strolch.runtime.privilege.PrivilegedRunnable;
import li.strolch.runtime.privilege.PrivilegedRunnableWithResult;
import li.strolch.utils.dbc.DBC;
import li.strolch.utils.helper.SystemHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -280,6 +279,8 @@ public class ComponentContainerImpl implements ComponentContainer {
this.state = ComponentState.STARTED;
logger.info("Garbage collecting after startup...");
System.gc();
logger.info(MessageFormat.format("System: {0}", SystemHelper.asString()));
logger.info(MessageFormat.format("Memory: {0}", SystemHelper.getMemorySummary()));
logger.info(MessageFormat.format("Using locale {0} with timezone {1}",