[Swift-commit] r7958 - trunk/src/org/griphyn/vdl/karajan/lib
hategan at ci.uchicago.edu
hategan at ci.uchicago.edu
Fri Jul 4 01:42:52 CDT 2014
Author: hategan
Date: 2014-07-04 01:42:52 -0500 (Fri, 04 Jul 2014)
New Revision: 7958
Modified:
trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java
Log:
moved logging of heap usage and JVM threads to the runtime stats
Modified: trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java 2014-07-04 06:42:14 UTC (rev 7957)
+++ trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java 2014-07-04 06:42:52 UTC (rev 7958)
@@ -340,6 +340,18 @@
Map<String, MutableInt> summary = getSummary();
long now = System.currentTimeMillis();
+ if (logger.isInfoEnabled()) {
+ Runtime r = Runtime.getRuntime();
+ long maxHeap = r.maxMemory();
+ long freeMemory = r.freeMemory();
+ long totalMemory = r.totalMemory();
+ long usedMemory = totalMemory - freeMemory;
+ int threadCount = Thread.activeCount();
+
+ logger.info("HeapMax: " + maxHeap + ", CrtHeap: " + totalMemory + ", UsedHeap: " + usedMemory +
+ ", JVMThreads: " + threadCount);
+ }
+
if (!forced && lastState != null && lastState.equals(summary)) {
return false;
}
@@ -379,16 +391,6 @@
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);
- }
-
return true;
}
More information about the Swift-commit
mailing list