geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccard...@apache.org
Subject svn commit: r510727 - in /geronimo/server/trunk/applications/console/geronimo-console-standard/src/main: java/org/apache/geronimo/console/jmxmanager/ webapp/WEB-INF/view/jmxmanager/
Date Fri, 23 Feb 2007 00:13:19 GMT
Author: ccardona
Date: Thu Feb 22 16:13:18 2007
New Revision: 510727

URL: http://svn.apache.org/viewvc?view=rev&rev=510727
Log:
GERONIMO-2853 Add a way to view MBean stats info in the JMX Viewer portlet (Changes):
- Fixed problem displaying bounded range statistic data
- Added 'Refresh Stats' button
- Added 'Stats' Tab info to the JMX Viewer help page

Modified:
    geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/jmxmanager/JMXManagerHelper.java
    geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/jmxmanager/help.jsp
    geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/jmxmanager/viewJMXServer.jsp

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/jmxmanager/JMXManagerHelper.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/jmxmanager/JMXManagerHelper.java?view=diff&rev=510727&r1=510726&r2=510727
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/jmxmanager/JMXManagerHelper.java
(original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/jmxmanager/JMXManagerHelper.java
Thu Feb 22 16:13:18 2007
@@ -400,36 +400,17 @@
                         long count = cStat.getCount();
                         mbeanStat.add(new String[] { "Count",
                                 Long.toString(count) });
-                    } else if (statistic instanceof BoundaryStatistic) {
-                        BoundaryStatistic bStat = (BoundaryStatistic) statistic;
-                        long upperBound = bStat.getUpperBound();
-                        mbeanStat.add(new String[] { "Upper Bound",
-                                Long.toString(upperBound) });
-                        long lowerBound = bStat.getLowerBound();
-                        mbeanStat.add(new String[] { "Lower Bound",
-                                Long.toString(lowerBound) });
-                    } else if (statistic instanceof RangeStatistic) {
-                        RangeStatistic rStat = (RangeStatistic) statistic;
-                        long highWaterMark = rStat.getHighWaterMark();
-                        mbeanStat.add(new String[] { "High Water Mark",
-                                Long.toString(highWaterMark) });
-                        long lowWaterMark = rStat.getLowWaterMark();
-                        mbeanStat.add(new String[] { "Low Water Mark",
-                                Long.toString(lowWaterMark) });
-                        long current = rStat.getCurrent();
-                        mbeanStat.add(new String[] { "Current",
-                                Long.toString(current) });
                     } else if (statistic instanceof TimeStatistic) {
                         TimeStatistic tStat = (TimeStatistic) statistic;
                         long count = tStat.getCount();
                         mbeanStat.add(new String[] { "Count",
                                 Long.toString(count) });
-                        long maxTime = tStat.getMaxTime();
+                        Date maxTime = new Date(tStat.getMaxTime());
                         mbeanStat.add(new String[] { "Max Time",
-                                Long.toString(maxTime) });
-                        long minTime = tStat.getMinTime();
+                                maxTime.toString() });
+                        Date minTime = new Date(tStat.getMinTime());
                         mbeanStat.add(new String[] { "Min Time",
-                                Long.toString(minTime) });
+                                minTime.toString() });
                         long totalTime = tStat.getTotalTime();
                         mbeanStat.add(new String[] { "Total Time",
                                 Long.toString(totalTime) });
@@ -448,6 +429,25 @@
                         mbeanStat.add(new String[] { "Low Water Mark",
                                 Long.toString(lowWaterMark) });
                         long current = brStat.getCurrent();
+                        mbeanStat.add(new String[] { "Current",
+                                Long.toString(current) });
+                    } else if (statistic instanceof BoundaryStatistic) {
+                        BoundaryStatistic bStat = (BoundaryStatistic) statistic;
+                        long upperBound = bStat.getUpperBound();
+                        mbeanStat.add(new String[] { "Upper Bound",
+                                Long.toString(upperBound) });
+                        long lowerBound = bStat.getLowerBound();
+                        mbeanStat.add(new String[] { "Lower Bound",
+                                Long.toString(lowerBound) });
+                    } else if (statistic instanceof RangeStatistic) {
+                        RangeStatistic rStat = (RangeStatistic) statistic;
+                        long highWaterMark = rStat.getHighWaterMark();
+                        mbeanStat.add(new String[] { "High Water Mark",
+                                Long.toString(highWaterMark) });
+                        long lowWaterMark = rStat.getLowWaterMark();
+                        mbeanStat.add(new String[] { "Low Water Mark",
+                                Long.toString(lowWaterMark) });
+                        long current = rStat.getCurrent();
                         mbeanStat.add(new String[] { "Current",
                                 Long.toString(current) });
                     }

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/jmxmanager/help.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/jmxmanager/help.jsp?view=diff&rev=510727&r1=510726&r2=510727
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/jmxmanager/help.jsp
(original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/jmxmanager/help.jsp
Thu Feb 22 16:13:18 2007
@@ -148,6 +148,19 @@
     </ul>
 </ul>
 
+<p><b>Stats Tab</b></p>
+
+<ul>
+    <li>Lists the statistics provided by a managed object. Statistics can be any of
the following types:</li>
+    <ul>
+        <li>Count Statistic - specifies standard count measurements
+        <li>Time Statistic - specifies standard timing measurements for a given operation
+        <li>Boundary Statistic - specifies standard measurements of the upper and lower
limits of the value of an attribute
+        <li>Range Statistic - specifies standard measurements of the lowest and highest
values an attribute has held as well as its current value
+        <li>Bounded Range Statistic - provides standard measurements of a range that
has fixed limits
+    </ul>
+</ul>
+
 <p><b>Search Tab</b></p>
 
 <ul>

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/jmxmanager/viewJMXServer.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/jmxmanager/viewJMXServer.jsp?view=diff&rev=510727&r1=510726&r2=510727
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/jmxmanager/viewJMXServer.jsp
(original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/jmxmanager/viewJMXServer.jsp
Thu Feb 22 16:13:18 2007
@@ -339,6 +339,14 @@
     var jmxQuery = dojo.widget.byId('jmxQuery').getValue();
     JMXHelper.listByPattern(<portlet:namespace/>updateSearchMBeansTreeNode, jmxQuery);
 }
+
+/**
+ * Refresh managed object stats button clicked event handler 
+ */
+function refreshStatsBtnClicked() {
+    var abstractName = $('abstractName').value;
+    JMXHelper.getMBeanStats(<portlet:namespace/>updateStatsTable, abstractName);
+}
 </script>
 
 <!----------------------->
@@ -979,6 +987,8 @@
                     <tbody id="statsTableBody">
                     </tbody>
                 </table>
+                <br>
+                &nbsp;<input type='button' value='Refresh Stats' onclick='refreshStatsBtnClicked()'
/> 
             </div> <!-- Stats tab -->
 
             <!-- Search tab -->



Mime
View raw message