Skip to main content

[memorypoolview~source-code-repository:249b2687] GC Charts are now updated at every JMX flush notification

  • From:
  • To:
  • Subject: [memorypoolview~source-code-repository:249b2687] GC Charts are now updated at every JMX flush notification
  • Date: Fri, 15 Mar 2013 09:19:14 +0000

Project:    memorypoolview
Repository: source-code-repository
Revision:   249b26877928dda063145e20f240e53b0f236857
Author:     pingtimeout
Date:       2013-03-15 09:21:08 UTC
Link:       

Log Message:
------------
Renamed Collections to Collection
Fixed GC detection, now when an unknown GC is detected, no NPE is thrown
Removed Constants class
Replaced "Generation" by the order in which GC will be displayed.
The "Generation" enum was added only to have Young GC being displayed
before old/full GC. This information is misleading since the only thing
needed here is an order.
The implementation of Comparator on GCModel now follows the contract of
the Comparactor interface.
GC Charts are now updated at every JMX flush notification


Revisions:
----------
dcf789ba6468b7d77ea5454c4d456654b351dd5b
6b7274c3c1f3050309855d4f2ee5ee21de33714e
68447e4ef452a352cd45ddbc075dff8f0b373c34
b5abb03263f30ec5fed2d69b0c7e2d0a3b3ffb3c
249b26877928dda063145e20f240e53b0f236857


Modified Paths:
---------------
src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorModel.java
src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorPanel.java
src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorSummaryPanel.java
src/com/kodewerk/visualvm/memorypools/gc/GarbageCollector.java
src/com/kodewerk/visualvm/memorypools/MemoryPoolPanel.java
src/com/kodewerk/visualvm/memorypools/MemoryPoolView.java
src/com/kodewerk/visualvm/memorypools/gc/Collection.java


Added Paths:
------------
src/com/kodewerk/visualvm/memorypools/gc/Collection.java


Diffs:
------
diff --git a/src/com/kodewerk/visualvm/memorypools/gc/Collection.java 
b/src/com/kodewerk/visualvm/memorypools/gc/Collection.java
new file mode 100644
index 0000000..2eb05e1
--- /dev/null
+++ b/src/com/kodewerk/visualvm/memorypools/gc/Collection.java
@@ -0,0 +1,52 @@
+package com.kodewerk.visualvm.memorypools.gc;
+
+import java.text.DecimalFormat;
+import java.text.DecimalFormatSymbols;
+import java.text.NumberFormat;
+import java.util.Locale;
+
+public class Collection {
+    private final long count;
+    private final long totalDuration;
+    private final long averageDuration;
+    private final long lastDuration;
+
+    public Collection() {
+        this(0, 0, 0);
+    }
+
+    public Collection(long count, long totalDuration, long lastDuration) {
+        this.count = count;
+        this.totalDuration = totalDuration;
+        this.lastDuration = lastDuration;
+        this.averageDuration = count != 0 ? totalDuration / count : 0;
+    }
+
+    public long getCount() {
+        return count;
+    }
+
+    public long getTotalDuration() {
+        return totalDuration;
+    }
+
+    public long getAverageDuration() {
+        return averageDuration;
+    }
+
+    public long getLastDuration() {
+        return lastDuration;
+    }
+
+    public boolean differFrom(Long collectionTime, Long collectionCount, 
Long lastDuration) {
+        return collectionTime != null && collectionCount != null && 
lastDuration != null
+                && !collectionCount.equals(count);
+    }
+
+    public static String formatNumber(long number) {
+        DecimalFormat formatter = (DecimalFormat) 
NumberFormat.getInstance(new Locale("en_US"));
+        DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols();
+        symbols.setGroupingSeparator(' ');
+        return formatter.format(number);
+    }
+}
diff --git a/src/com/kodewerk/visualvm/memorypools/gc/Collections.java 
b/src/com/kodewerk/visualvm/memorypools/gc/Collections.java
deleted file mode 100644
index 0b9c837..0000000
--- a/src/com/kodewerk/visualvm/memorypools/gc/Collections.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package com.kodewerk.visualvm.memorypools.gc;
-
-import java.text.DecimalFormat;
-import java.text.DecimalFormatSymbols;
-import java.text.NumberFormat;
-import java.util.Locale;
-
-public class Collections {
-    private final long count;
-    private final long totalDuration;
-    private final long averageDuration;
-    private final long lastDuration;
-
-    public Collections() {
-        this(0, 0, 0);
-    }
-
-    public Collections(long count, long totalDuration, long lastDuration) {
-        this.count = count;
-        this.totalDuration = totalDuration;
-        this.lastDuration = lastDuration;
-        this.averageDuration = count != 0 ? totalDuration / count : 0;
-    }
-
-    public long getCount() {
-        return count;
-    }
-
-    public long getTotalDuration() {
-        return totalDuration;
-    }
-
-    public long getAverageDuration() {
-        return averageDuration;
-    }
-
-    public long getLastDuration() {
-        return lastDuration;
-    }
-
-    public boolean differFrom(Long collectionTime, Long collectionCount, 
Long lastDuration) {
-        return collectionTime != null && collectionCount != null && 
lastDuration != null
-                && !collectionCount.equals(count);
-    }
-
-    public static String formatNumber(long number) {
-        DecimalFormat formatter = (DecimalFormat) 
NumberFormat.getInstance(new Locale("en_US"));
-        DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols();
-        symbols.setGroupingSeparator(' ');
-        return formatter.format(number);
-    }
-}
diff --git 
a/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorModel.java 
b/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorModel.java
index 7d21dbe..e860d17 100644
--- a/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorModel.java
+++ b/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorModel.java
@@ -18,7 +18,7 @@ public class GarbageCollectorModel implements 
MBeanCacheListener {
     private final MBeanServerConnection mbeanServerConnection;
     private final GarbageCollector garbageCollector;
 
-    private Collections collections = new Collections();
+    private Collection collections = new Collection();
 
     public GarbageCollectorModel(final ObjectName mbeanName, final JmxModel 
model, final MBeanServerConnection mbeanServerConnection) throws 
MBeanException, AttributeNotFoundException, InstanceNotFoundException, 
ReflectionException, IOException {
         this.mbeanName = mbeanName;
@@ -35,7 +35,7 @@ public class GarbageCollectorModel implements 
MBeanCacheListener {
             Long collectionCount = (Long) 
mbeanServerConnection.getAttribute(mbeanName, "CollectionCount");
             Long lastDuration = extractLastDuration();
             if (collections.differFrom(collectionTime, collectionCount, 
lastDuration)) {
-                this.collections = new Collections(collectionCount, 
collectionTime, lastDuration);
+                this.collections = new Collection(collectionCount, 
collectionTime, lastDuration);
                 tickleListeners();
             }
         } catch (Throwable t) {
diff --git 
a/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorPanel.java 
b/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorPanel.java
index 1ff524a..4ad96a1 100644
--- a/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorPanel.java
+++ b/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorPanel.java
@@ -31,10 +31,10 @@ public class GarbageCollectorPanel extends JPanel 
implements GarbageCollectorMod
         chart.addValues(System.currentTimeMillis(), dataPoints);
 
         String[] details = new String[4];
-        details[0] = Collections.formatNumber(model.getLastDuration()) + " 
ms";
+        details[0] = Collection.formatNumber(model.getLastDuration()) + " 
ms";
         details[1] = String.valueOf(model.getCount());
-        details[2] = Collections.formatNumber(model.getAverageDuration()) + 
" ms";
-        details[3] = Collections.formatNumber(model.getTotalDuration()) + " 
ms";
+        details[2] = Collection.formatNumber(model.getAverageDuration()) + " 
ms";
+        details[3] = Collection.formatNumber(model.getTotalDuration()) + " 
ms";
         chart.updateDetails(details);
     }
 }
diff --git 
a/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorSummaryPanel.java 
b/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorSummaryPanel.java
index e8a1b89..a140fca 100644
--- 
a/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorSummaryPanel.java
+++ 
b/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorSummaryPanel.java
@@ -44,8 +44,8 @@ public class GarbageCollectorSummaryPanel extends JPanel 
implements GarbageColle
     @Override
     public void garbageCollectorUpdated(GarbageCollectorModel model) {
         gcCount.setText(String.valueOf(model.getCount()));
-        
averageDuration.setText(Collections.formatNumber(model.getAverageDuration()) 
+ " ms");
-        
lastDuration.setText(Collections.formatNumber(model.getLastDuration()) + " 
ms");
-        
totalDuration.setText(Collections.formatNumber(model.getTotalDuration()) + " 
ms");
+        
averageDuration.setText(Collection.formatNumber(model.getAverageDuration()) + 
" ms");
+        
lastDuration.setText(Collection.formatNumber(model.getLastDuration()) + " 
ms");
+        
totalDuration.setText(Collection.formatNumber(model.getTotalDuration()) + " 
ms");
     }
 }
diff --git a/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollector.java 
b/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollector.java
index 555abe1..28c131c 100644
--- a/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollector.java
+++ b/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollector.java
@@ -9,6 +9,8 @@ public enum GarbageCollector {
     , MARK_SWEEP_COMPACT("MarkSweepCompact", Generation.OLD)
     , CMS("ConcurrentMarkSweep", Generation.OLD)
     , G1_OLD("G1 Old Generation", Generation.OLD)
+
+    , UNKNOWN("Unknown GC", Generation.OLD)
     ;
 
     private final String name;
@@ -33,6 +35,6 @@ public enum GarbageCollector {
                 return garbageCollector;
             }
         }
-        return null;
+        return UNKNOWN;
     }
 }
diff --git a/src/com/kodewerk/visualvm/memorypools/Constants.java 
b/src/com/kodewerk/visualvm/memorypools/Constants.java
deleted file mode 100644
index 8b9fec8..0000000
--- a/src/com/kodewerk/visualvm/memorypools/Constants.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.kodewerk.visualvm.memorypools;
-
-import javax.management.ObjectName;
-
-public class Constants {
-    public final static ObjectName GARBAGE_COLLECTOR_WILDCARD_PATTERN = 
createGarbageCollectorWilcardPattern();
-    public volatile static ObjectName MEMORY_POOL_WILDCARD_PATTERN = 
createMemoryPoolWilcardPattern();
-
-    public final static long ONE_MEGABYTE_SIZE = 1048576;
-
-    public static final String IMAGE_PATH = 
"com/kodewerk/visualvm/memorypools/resources/monitor.png";
-
-    private static ObjectName createGarbageCollectorWilcardPattern() {
-        try {
-            return new ObjectName("java.lang:type=GarbageCollector,name=*");
-        } catch (Exception ignored) {
-            return null;
-        }
-    }
-
-    private static ObjectName createMemoryPoolWilcardPattern() {
-        try {
-            return new ObjectName("java.lang:type=MemoryPool,name=*");
-        } catch (Exception ignored) {
-            return null;
-        }
-    }
-}
diff --git a/src/com/kodewerk/visualvm/memorypools/MemoryPoolPanel.java 
b/src/com/kodewerk/visualvm/memorypools/MemoryPoolPanel.java
index ad9e69b..dc8c1c8 100644
--- a/src/com/kodewerk/visualvm/memorypools/MemoryPoolPanel.java
+++ b/src/com/kodewerk/visualvm/memorypools/MemoryPoolPanel.java
@@ -27,11 +27,13 @@ import javax.swing.JPanel;
  * @author kirk
  */
 public class MemoryPoolPanel extends JPanel implements 
MemoryPoolModelListener {
+    private final static long ONE_MEGABYTE_SIZE = 1048576;
+
     private SimpleXYChartSupport chart;
 
     public MemoryPoolPanel(String name) {
         setLayout(new BorderLayout());
-        SimpleXYChartDescriptor description = 
SimpleXYChartDescriptor.bytes(Constants.ONE_MEGABYTE_SIZE, false, 1000);
+        SimpleXYChartDescriptor description = 
SimpleXYChartDescriptor.bytes(ONE_MEGABYTE_SIZE, false, 1000);
         description.setDetailsItems(new String[3]);
 
         description.addLineItems("Memory Pool Size");
diff --git a/src/com/kodewerk/visualvm/memorypools/MemoryPoolView.java 
b/src/com/kodewerk/visualvm/memorypools/MemoryPoolView.java
index 5688f5b..7c20bbd 100644
--- a/src/com/kodewerk/visualvm/memorypools/MemoryPoolView.java
+++ b/src/com/kodewerk/visualvm/memorypools/MemoryPoolView.java
@@ -42,19 +42,39 @@ import java.util.TreeSet;
  * @author kirk
  */
 class MemoryPoolView extends DataSourceView {
+    private final static ObjectName GARBAGE_COLLECTOR_WILDCARD_PATTERN = 
createGarbageCollectorWilcardPattern();
+    private final static ObjectName MEMORY_POOL_WILDCARD_PATTERN = 
createMemoryPoolWilcardPattern();
+    private static final String IMAGE_PATH = 
"com/kodewerk/visualvm/memorypools/resources/monitor.png";
+
     private final ArrayList<MemoryPoolModel> memoryPoolModels = new 
ArrayList<MemoryPoolModel>();
     private final Set<GarbageCollectorModel> garbageCollectorModels = new 
TreeSet<GarbageCollectorModel>(GarbageCollectorModel.compareOnGeneration());
     private DataViewComponent dvc;
 
-    public MemoryPoolView(Application application) {
-        super(application, "Memory Pools", new 
ImageIcon(ImageUtilities.loadImage(Constants.IMAGE_PATH, true)).getImage(), 
60, false);
-    }
-
     public static MBeanServerConnection getMBeanServerConnection(Application 
application) {
         JmxModel jmx = JmxModelFactory.getJmxModelFor(application);
         return jmx == null ? null : jmx.getMBeanServerConnection();
     }
 
+    private static ObjectName createGarbageCollectorWilcardPattern() {
+        try {
+            return new ObjectName("java.lang:type=GarbageCollector,name=*");
+        } catch (Exception ignored) {
+            return null;
+        }
+    }
+
+    private static ObjectName createMemoryPoolWilcardPattern() {
+        try {
+            return new ObjectName("java.lang:type=MemoryPool,name=*");
+        } catch (Exception ignored) {
+            return null;
+        }
+    }
+
+    public MemoryPoolView(Application application) {
+        super(application, "Memory Pools", new 
ImageIcon(ImageUtilities.loadImage(IMAGE_PATH, true)).getImage(), 60, false);
+    }
+
     @Override
     protected DataViewComponent createComponent() {
         //Data area for master view:
@@ -88,7 +108,7 @@ class MemoryPoolView extends DataSourceView {
     private void findMemoryPools() {
         try {
             MBeanServerConnection conn = 
getMBeanServerConnection((Application) super.getDataSource());
-            for (ObjectName name : 
conn.queryNames(Constants.MEMORY_POOL_WILDCARD_PATTERN, null)) {
+            for (ObjectName name : 
conn.queryNames(MEMORY_POOL_WILDCARD_PATTERN, null)) {
                 initializeMemoryPoolModel(name, conn);
             }
         } catch (IOException e) {
@@ -145,7 +165,7 @@ class MemoryPoolView extends DataSourceView {
     protected void findGarbageCollectors() {
         try {
             MBeanServerConnection conn = 
getMBeanServerConnection((Application) super.getDataSource());
-            for (ObjectName name : 
conn.queryNames(Constants.GARBAGE_COLLECTOR_WILDCARD_PATTERN, null)) {
+            for (ObjectName name : 
conn.queryNames(GARBAGE_COLLECTOR_WILDCARD_PATTERN, null)) {
                 initializeGarbageCollectorModel(name, conn);
             }
         } catch (IOException e) {
diff --git 
a/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorPanel.java 
b/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorPanel.java
index 4ad96a1..6b986ff 100644
--- a/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorPanel.java
+++ b/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorPanel.java
@@ -9,11 +9,13 @@ import javax.swing.*;
 import java.awt.*;
 
 public class GarbageCollectorPanel extends JPanel implements 
GarbageCollectorModelListener {
+    private final static long ONE_MEGABYTE_SIZE = 1048576;
+
     private SimpleXYChartSupport chart;
 
     public GarbageCollectorPanel(String name) {
         setLayout(new BorderLayout());
-        SimpleXYChartDescriptor description = 
SimpleXYChartDescriptor.decimal(Constants.ONE_MEGABYTE_SIZE, false, 1000);
+        SimpleXYChartDescriptor description = 
SimpleXYChartDescriptor.decimal(ONE_MEGABYTE_SIZE, false, 1000);
 
         description.addLineItems("Last GC duration");
         description.addLineItems("Average duration");
diff --git a/src/com/kodewerk/visualvm/memorypools/MemoryPoolView.java 
b/src/com/kodewerk/visualvm/memorypools/MemoryPoolView.java
index 7c20bbd..0e46fb6 100644
--- a/src/com/kodewerk/visualvm/memorypools/MemoryPoolView.java
+++ b/src/com/kodewerk/visualvm/memorypools/MemoryPoolView.java
@@ -174,7 +174,7 @@ class MemoryPoolView extends DataSourceView {
     }
 
     private void createGarbageCollectorPanelFor(GarbageCollectorModel model, 
PanelPositions positions) {
-        GarbageCollectorPanel panel = new 
GarbageCollectorPanel(model.getName());
+        GarbageCollectorPanel panel = new GarbageCollectorPanel();
         model.registerView(panel);
         Point position = positions.of(model.getName());
         DataViewComponent.DetailsView detailsView = new 
DataViewComponent.DetailsView(
diff --git a/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollector.java 
b/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollector.java
index 28c131c..86a6c82 100644
--- a/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollector.java
+++ b/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollector.java
@@ -1,34 +1,35 @@
 package com.kodewerk.visualvm.memorypools.gc;
 
 public enum GarbageCollector {
-    PS_SCAVENGE("PS Scavenge", Generation.YOUNG)
-    , PAR_NEW("ParNew", Generation.YOUNG)
-    , SERIAL("Copy", Generation.YOUNG)
-    , G1_YOUNG("G1 Young Generation", Generation.YOUNG)
-    , PS_MARK_SWEEP("PS MarkSweep", Generation.OLD)
-    , MARK_SWEEP_COMPACT("MarkSweepCompact", Generation.OLD)
-    , CMS("ConcurrentMarkSweep", Generation.OLD)
-    , G1_OLD("G1 Old Generation", Generation.OLD)
-
-    , UNKNOWN("Unknown GC", Generation.OLD)
+    PS_SCAVENGE("PS Scavenge", 1)
+    , PAR_NEW("ParNew", 2)
+    , SERIAL("Copy", 3)
+    , G1_YOUNG("G1 Young Generation", 4)
+
+    , PS_MARK_SWEEP("PS MarkSweep", 21)
+    , MARK_SWEEP_COMPACT("MarkSweepCompact", 22)
+    , CMS("ConcurrentMarkSweep", 23)
+    , G1_OLD("G1 Old Generation", 24)
+
+    , UNKNOWN("Unknown GC", Integer.MAX_VALUE)
     ;
 
     private final String name;
-    private final Generation generation;
+    private final int order;
 
-    GarbageCollector(String name, Generation generation) {
+    GarbageCollector(String name, int order) {
         this.name = name;
-        this.generation = generation;
-    }
-
-    public Generation getGeneration() {
-        return generation;
+        this.order = order;
     }
 
     public String getName() {
         return name;
     }
 
+    public int getOrder() {
+        return order;
+    }
+
     static GarbageCollector fromName(String name) {
         for (GarbageCollector garbageCollector : values()) {
             if(garbageCollector.name.equals(name)) {
diff --git 
a/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorModel.java 
b/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorModel.java
index e860d17..4ce2610 100644
--- a/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorModel.java
+++ b/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorModel.java
@@ -60,7 +60,10 @@ public class GarbageCollectorModel implements 
MBeanCacheListener {
         Long lastCollectionStartTime = (Long) 
mbeanServerConnection.getAttribute(mbeanName, "LastCollectionStartTime");
         Long lastCollectionEndTime = (Long) 
mbeanServerConnection.getAttribute(mbeanName, "LastCollectionEndTime");
         if (lastCollectionStartTime == null || lastCollectionEndTime == 
null) {
-            return null;
+            throw new AttributeNotFoundException("Last collection duration 
could not be retrieved. " +
+                    "lastCollectionStartTime=[" + lastCollectionStartTime +
+                    "], lastCollectionEndTime=[" + lastCollectionEndTime +
+                    "]");
         } else {
             return lastCollectionEndTime - lastCollectionStartTime;
         }
@@ -100,13 +103,7 @@ public class GarbageCollectorModel implements 
MBeanCacheListener {
         return new Comparator<GarbageCollectorModel>() {
             @Override
             public int compare(GarbageCollectorModel o1, 
GarbageCollectorModel o2) {
-                // This method does not respect the general contract of 
compare in Comparable
-                // However, since we cannot have two GC for the same 
generation in a JVM, this method does the job
-                if(o1.garbageCollector.getGeneration() == Generation.YOUNG) {
-                    return -1;
-                } else {
-                    return 1;
-                }
+                return o1.garbageCollector.getOrder() - 
o2.garbageCollector.getOrder();
             }
         };
     }
diff --git 
a/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorPanel.java 
b/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorPanel.java
index 6b986ff..377da31 100644
--- a/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorPanel.java
+++ b/src/com/kodewerk/visualvm/memorypools/gc/GarbageCollectorPanel.java
@@ -1,6 +1,5 @@
 package com.kodewerk.visualvm.memorypools.gc;
 
-import com.kodewerk.visualvm.memorypools.Constants;
 import com.sun.tools.visualvm.charts.ChartFactory;
 import com.sun.tools.visualvm.charts.SimpleXYChartDescriptor;
 import com.sun.tools.visualvm.charts.SimpleXYChartSupport;
@@ -13,7 +12,7 @@ public class GarbageCollectorPanel extends JPanel 
implements GarbageCollectorMod
 
     private SimpleXYChartSupport chart;
 
-    public GarbageCollectorPanel(String name) {
+    public GarbageCollectorPanel() {
         setLayout(new BorderLayout());
         SimpleXYChartDescriptor description = 
SimpleXYChartDescriptor.decimal(ONE_MEGABYTE_SIZE, false, 1000);
 
diff --git a/src/com/kodewerk/visualvm/memorypools/gc/Generation.java 
b/src/com/kodewerk/visualvm/memorypools/gc/Generation.java
deleted file mode 100644
index 51167b2..0000000
--- a/src/com/kodewerk/visualvm/memorypools/gc/Generation.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.kodewerk.visualvm.memorypools.gc;
-
-public enum Generation {
-    YOUNG, OLD
-}
diff --git a/src/com/kodewerk/visualvm/memorypools/gc/Collection.java 
b/src/com/kodewerk/visualvm/memorypools/gc/Collection.java
index 2eb05e1..71a52ef 100644
--- a/src/com/kodewerk/visualvm/memorypools/gc/Collection.java
+++ b/src/com/kodewerk/visualvm/memorypools/gc/Collection.java
@@ -40,7 +40,8 @@ public class Collection {
 
     public boolean differFrom(Long collectionTime, Long collectionCount, 
Long lastDuration) {
         return collectionTime != null && collectionCount != null && 
lastDuration != null
-                && !collectionCount.equals(count);
+//                && !collectionCount.equals(count)
+                ;
     }
 
     public static String formatNumber(long number) {




[memorypoolview~source-code-repository:249b2687] GC Charts are now updated at every JMX flush notification

pingtimeout 03/15/2013
 
 
Close
loading
Please Confirm
Close