[Swift-commit] r7503 - branches/release-0.94/src/org/griphyn/vdl/karajan/lib
hategan at ci.uchicago.edu
hategan at ci.uchicago.edu
Wed Jan 22 21:17:26 CST 2014
Author: hategan
Date: 2014-01-22 21:17:26 -0600 (Wed, 22 Jan 2014)
New Revision: 7503
Modified:
branches/release-0.94/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java
Log:
added code to regularly log memory usage of the swift process
Modified: branches/release-0.94/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java
===================================================================
--- branches/release-0.94/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java 2014-01-22 23:07:19 UTC (rev 7502)
+++ branches/release-0.94/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java 2014-01-23 03:17:26 UTC (rev 7503)
@@ -271,6 +271,15 @@
if (logger.isInfoEnabled()) {
logger.info(msg);
}
+ if (logger.isInfoEnabled()) {
+ Runtime r = Runtime.getRuntime();
+ long maxHeap = r.maxMemory();
+ long freeMemory = r.freeMemory();
+ long totalMemory = r.totalMemory();
+ long usedMemory = totalMemory - freeMemory;
+
+ logger.info("HeapMax: " + maxHeap + ", CrtHeap: " + totalMemory + ", UsedHeap: " + usedMemory);
+ }
}
}
More information about the Swift-commit
mailing list