You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by sj...@apache.org on 2016/10/18 12:43:30 UTC
[4/8] brooklyn-server git commit: Fix calculation of currently used
memory by the JVM
Fix calculation of currently used memory by the JVM
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/ac04bbf1
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/ac04bbf1
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/ac04bbf1
Branch: refs/heads/master
Commit: ac04bbf145501f4ee0cde5b8160343499ff5b0eb
Parents: 16ebd0c
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Authored: Fri Oct 14 12:47:27 2016 +0300
Committer: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Committed: Fri Oct 14 12:47:27 2016 +0300
----------------------------------------------------------------------
.../brooklyn/core/mgmt/internal/BrooklynGarbageCollector.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/ac04bbf1/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/BrooklynGarbageCollector.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/BrooklynGarbageCollector.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/BrooklynGarbageCollector.java
index 60dae0e..0d10c5a 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/BrooklynGarbageCollector.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/BrooklynGarbageCollector.java
@@ -237,7 +237,7 @@ public class BrooklynGarbageCollector {
public static String makeBasicUsageString() {
int present = (int)Math.round(100.0*SoftlyPresent.getUsageTracker().getPercentagePresent());
- return Strings.makeSizeString(Runtime.getRuntime().maxMemory() - Runtime.getRuntime().freeMemory())+" / "+
+ return Strings.makeSizeString(Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory())+" / "+
Strings.makeSizeString(Runtime.getRuntime().maxMemory())
+ (Runtime.getRuntime().maxMemory() > Runtime.getRuntime().totalMemory() ?
" ("+ Strings.makeSizeString(Runtime.getRuntime().totalMemory()) +" real)"