cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r905930 - /cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/AboutDialog.java
Date Wed, 03 Feb 2010 08:16:02 GMT
Author: aadamchik
Date: Wed Feb  3 08:15:59 2010
New Revision: 905930

URL: http://svn.apache.org/viewvc?rev=905930&view=rev
Log:
adding max heap to About Dialog

Modified:
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/AboutDialog.java

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/AboutDialog.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/AboutDialog.java?rev=905930&r1=905929&r2=905930&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/AboutDialog.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/AboutDialog.java
Wed Feb  3 08:15:59 2010
@@ -67,6 +67,10 @@
      */
     static synchronized String getInfoString() {
         if (infoString == null) {
+            
+            double bytes = Runtime.getRuntime().maxMemory();
+            long mBytes = Math.round(bytes / 1024 / 1024);
+            
             StringBuffer buffer = new StringBuffer();
             buffer.append("<html>");
             buffer.append("<font size='-1' face='Arial,Helvetica'>");
@@ -76,6 +80,8 @@
             buffer.append("<font size='-2' face='Arial,Helvetica'>");
             buffer.append("<br>JVM: " + System.getProperty("java.vm.name") + " " +

                     System.getProperty("java.version"));
+            buffer.append("<font size='-2' face='Arial,Helvetica'>");
+            buffer.append("<br>Max Heap Size: " + mBytes + " MB");
             
             String version = LocalizedStringsHandler.getString("cayenne.version");
             if (version != null) {



Mime
View raw message