public double getJavaMemoryUsage() { return (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1024.0 / 1024.0; }
public double getJavaMaxMemory() { return Runtime.getRuntime().maxMemory() / 1024.0 / 1024.0; }