code: public PerformUsage getJVMMemoryUsage() {
          int mb = 1024 * 1024;
          Runtime rt = Runtime.getRuntime();
          PerformUsage usage = new PerformUsage();
          usage.totalMemory = (double) rt.totalMemory() / mb;
          usage.freeMemory = (double) rt.freeMemory() / mb;
          usage.usedMemory = (double) rt.totalMemory() / mb - rt.freeMemory()
                  / mb;
          usage.maxMemory = (double) rt.maxMemory() / mb;
          usage.memoryUsagePercent = usage.usedMemory / usage.maxMemory * 100.0;
  
          // update current
          currentJvmPerformUsage = usage;
          return usage;
      }
docs: Gets the JVM memory usage.
  
  @return the JVM memory usage