geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akulshresh...@apache.org
Subject svn commit: r605403 - in /geronimo/server/trunk: framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/ plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/ plugins/jett...
Date Wed, 19 Dec 2007 03:27:22 GMT
Author: akulshreshtha
Date: Tue Dec 18 19:27:20 2007
New Revision: 605403

URL: http://svn.apache.org/viewvc?rev=605403&view=rev
Log:
GERONIMO-3712 Include ConnectionsCount statistics  in TimeStatistics named ConnectionsDuration.
JettyWebContainer : Include RequestCount statistics in TimeStatistics named RequestDuration.
                    Remove RequestDurationAverage

Modified:
    geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/JettyWebConnectorStats.java
    geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/JettyWebConnectorStatsImpl.java
    geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/JettyWebContainerStatsImpl.java
    geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/WebContainerStats.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/WebManagerPortlet.java
    geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainerImpl.java
    geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/connector/JettyConnector.java

Modified: geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/JettyWebConnectorStats.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/JettyWebConnectorStats.java?rev=605403&r1=605402&r2=605403&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/JettyWebConnectorStats.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/JettyWebConnectorStats.java
Tue Dec 18 19:27:20 2007
@@ -24,10 +24,6 @@
 import javax.management.j2ee.statistics.CountStatistic;
 
 public interface JettyWebConnectorStats extends WebConnectorStats {
-    /**
-     * Gets the number of connections since statistics gathering started.
-     */
-    CountStatistic getConnectionsCount();
     
     /**
      * Gets the number of request count since statistics gathering started.
@@ -35,7 +31,7 @@
     CountStatistic getRequestCount();
 
     /**
-     * Gets the avg, min, max, and total connection duration time since 
+     * Gets the count, min, max, and total connection duration time since 
      * statistics gathering started.
      */
     TimeStatistic getConnectionsDuration();

Modified: geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/JettyWebConnectorStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/JettyWebConnectorStatsImpl.java?rev=605403&r1=605402&r2=605403&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/JettyWebConnectorStatsImpl.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/JettyWebConnectorStatsImpl.java
Tue Dec 18 19:27:20 2007
@@ -35,14 +35,11 @@
  * Jetty Web Connector class for JSR-77 stats.
  */
 public class JettyWebConnectorStatsImpl extends WebConnectorStatsImpl implements JettyWebConnectorStats
{
-    private CountStatisticImpl connectionsCount;
     private CountStatisticImpl requestCount;
     private TimeStatisticImpl connectionsDuration;
     private RangeStatisticImpl connectionsRequest;
     
     public JettyWebConnectorStatsImpl() {
-        connectionsCount = new CountStatisticImpl("Connections Count", StatisticImpl.UNIT_COUNT,
-                "Total number of connections made to server", 0);
         requestCount = new CountStatisticImpl("Request Count", StatisticImpl.UNIT_COUNT,
                 "Total number of requests made to server", 0);
         connectionsDuration = new TimeStatisticImpl("Connections Duration", StatisticImpl.UNIT_TIME_MILLISECOND,
@@ -50,18 +47,10 @@
         connectionsRequest = new RangeStatisticImpl("Connections Request", StatisticImpl.UNIT_COUNT,
                 "Range for connections requested during the observed period", 0);       //
all 0's
         
-        addStat("ConnectionsCount", connectionsCount);
         addStat("RequestCount", requestCount);
         addStat("ConnectionsDuration", connectionsDuration);
         addStat("ConnectionsRequest", connectionsRequest);
     }
-   
-    /**
-     * Gets the number of connections since statistics gathering started.
-     */
-    public CountStatistic getConnectionsCount() {
-        return connectionsCount;
-    }
     
     /**
      * Gets the number of request count since statistics gathering started.
@@ -86,13 +75,6 @@
     }
     
     /**
-     * Gets the number of connections since statistics gathering started.
-     */
-    public CountStatisticImpl getConnectionsCountImpl() {
-        return connectionsCount;
-    }
-    
-    /**
      * Gets the number of request count since statistics gathering started.
      */
     public CountStatisticImpl getRequestCountImpl() {
@@ -100,8 +82,8 @@
     }
 
     /**
-     * Gets the avg, min, max, and total connection duration time since 
-     * statistics gathering started.
+     * Gets the count, min, max, and total connection duration time since 
+     * statistics gathering started. The avg is total/count
      */
     public TimeStatisticImpl getConnectionsDurationImpl() {
         return connectionsDuration;

Modified: geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/JettyWebContainerStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/JettyWebContainerStatsImpl.java?rev=605403&r1=605402&r2=605403&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/JettyWebContainerStatsImpl.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/JettyWebContainerStatsImpl.java
Tue Dec 18 19:27:20 2007
@@ -32,10 +32,8 @@
  * @version $Revision: 1.0$
  */
 public class JettyWebContainerStatsImpl extends StatsImpl implements JettyWebContainerStats
{
-    private CountStatisticImpl totalRequestCount;
     private RangeStatisticImpl activeRequestCount;
     private TimeStatisticImpl requestDuration;
-    private CountStatisticImpl requestDurationAvg;
     private CountStatisticImpl response1xx;
     private CountStatisticImpl response2xx;
     private CountStatisticImpl response3xx;
@@ -44,14 +42,10 @@
     private CountStatisticImpl statsOnMs;               // time elapsed since the stats collection
 
     public JettyWebContainerStatsImpl() {
-        totalRequestCount = new CountStatisticImpl("Request Count", StatisticImpl.UNIT_COUNT,
-                "The number of requests that were handled since statistics gathering started");
         activeRequestCount = new RangeStatisticImpl("Active Request Count", StatisticImpl.UNIT_COUNT,
                 "The number of requests being processed concurrently");
         requestDuration = new TimeStatisticImpl("Request Duration", StatisticImpl.UNIT_TIME_MILLISECOND,
                 "The length of time that it's taken to handle individual requests");
-        requestDurationAvg = new CountStatisticImpl("Request Duration Average", StatisticImpl.UNIT_TIME_MILLISECOND,
-                "The average length of time that it's taken to handle individual requests");
         response1xx = new CountStatisticImpl("Response 1xx", StatisticImpl.UNIT_COUNT,
                 "The number of 1xx responses");
         response2xx = new CountStatisticImpl("Response 2xx", StatisticImpl.UNIT_COUNT,
@@ -65,10 +59,8 @@
         statsOnMs = new CountStatisticImpl("Stats Duration", StatisticImpl.UNIT_TIME_MILLISECOND,
                 "The length of time that statistics have been collected.");
 
-        addStat("TotalRequestCount", totalRequestCount);
         addStat("ActiveRequestCount", activeRequestCount);
         addStat("RequestDuration", requestDuration);
-        addStat("RequestDurationAvg", requestDurationAvg);
         addStat("Responses1xx", response1xx);
         addStat("Responses2xx", response2xx);
         addStat("Responses3xx", response3xx);
@@ -83,10 +75,6 @@
  * retrieve the stats for presentation purposes.
  */
 
-    public CountStatistic getTotalRequestCount() {
-        return totalRequestCount;
-    }
-
     public RangeStatistic getActiveRequestCount() {
         return activeRequestCount;
     }
@@ -95,10 +83,6 @@
         return requestDuration;
     }
 
-    public CountStatistic getRequestDurationAvg() {
-        return requestDurationAvg;
-    }
-
     /**
      * @return Gets the number of 1xx status returned by this
      * context since last call of stats reset.
@@ -151,20 +135,12 @@
  * These are used by the JettyContainerImpl to set the values.
  */
 
-    public CountStatisticImpl getTotalRequestCountImpl() {
-        return totalRequestCount;
-    }
-
     public RangeStatisticImpl getActiveRequestCountImpl() {
         return activeRequestCount;
     }
 
     public TimeStatisticImpl getRequestDurationImpl() {
         return requestDuration;
-    }
-
-    public CountStatisticImpl getRequestDurationAvgImpl() {
-        return requestDurationAvg;
     }
 
     /**

Modified: geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/WebContainerStats.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/WebContainerStats.java?rev=605403&r1=605402&r2=605403&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/WebContainerStats.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/WebContainerStats.java
Tue Dec 18 19:27:20 2007
@@ -32,27 +32,18 @@
 public interface WebContainerStats extends Stats {
 
     /**
-     * Gets the number of requests that have been processed since statistics
-     * gathering started.
-     */
-    CountStatistic getTotalRequestCount();
-
-    /**
      * Gets the number of requests being processed concurrently (as well
      * as the min and max since statistics gathering started).
      */
     RangeStatistic getActiveRequestCount();
 
     /**
+     * Gets the the number of requests that have been processed since 
+     * statistics gathering started.
      * Gets the length of time taken to process a request (includes
      * figures across all requests since statistics gathering started)
      */
     TimeStatistic getRequestDuration();
-
-    /**
-     * Gets the average time to process a request
-     */
-    CountStatistic getRequestDurationAvg();
 
     /**
      * Gets the count of 1xx responses

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/WebManagerPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/WebManagerPortlet.java?rev=605403&r1=605402&r2=605403&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/WebManagerPortlet.java
(original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/WebManagerPortlet.java
Tue Dec 18 19:27:20 2007
@@ -133,14 +133,20 @@
                         if (populateStats) {
                             // get the detailed stats
                             WebContainerStats webStats = (WebContainerStats) ((StatisticsProvider)container).getStats();
-                            renderRequest.setAttribute("totalRequestCount", new Long(webStats.getTotalRequestCount().getCount()));
+                            //renderRequest.setAttribute("totalRequestCount", new Long(webStats.getTotalRequestCount().getCount()));
                             renderRequest.setAttribute("activeRequestCountCurrent", new Long(webStats.getActiveRequestCount().getCurrent()));
                             renderRequest.setAttribute("activeRequestCountLow", new Long(webStats.getActiveRequestCount().getLowWaterMark()));
                             renderRequest.setAttribute("activeRequestCountHigh", new Long(webStats.getActiveRequestCount().getHighWaterMark()));
-                            renderRequest.setAttribute("requestDurationAvg", new Long(webStats.getRequestDurationAvg().getCount()));
+                            
+                            Long count = new Long(webStats.getRequestDuration().getCount());
+                            Long totalTime = new Long(webStats.getRequestDuration().getTotalTime());
+                            renderRequest.setAttribute("totalRequestCount", count);
                             renderRequest.setAttribute("requestDurationMinTime", new Long(webStats.getRequestDuration().getMinTime()));
                             renderRequest.setAttribute("requestDurationMaxTime", new Long(webStats.getRequestDuration().getMaxTime()));
-                            renderRequest.setAttribute("requestDurationTotalTime", new Long(webStats.getRequestDuration().getTotalTime()));
+                            renderRequest.setAttribute("requestDurationTotalTime", totalTime);
+                            // renderRequest.setAttribute("requestDurationAvg", new Long(webStats.getRequestDurationAvg().getCount()));
+                            Long avg = count == 0 ? 0: new Long(totalTime/count);
+                            renderRequest.setAttribute("requestDurationAvg", avg);
                             renderRequest.setAttribute("response1xx", new Long(webStats.getResponses1xx().getCount()));
                             renderRequest.setAttribute("response2xx", new Long(webStats.getResponses2xx().getCount()));
                             renderRequest.setAttribute("response3xx", new Long(webStats.getResponses3xx().getCount()));

Modified: geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainerImpl.java?rev=605403&r1=605402&r2=605403&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainerImpl.java
(original)
+++ geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainerImpl.java
Tue Dec 18 19:27:20 2007
@@ -167,19 +167,15 @@
     public Stats getStats() {
         if (isStatsOn()) {
             stats.setLastSampleTime();
-            /* set active request count */
-            stats.getTotalRequestCountImpl().setCount((long)statsHandler.getRequests());
-    
+
             /* set active request range values */
             stats.getActiveRequestCountImpl().setCurrent((long)statsHandler.getRequestsActive());
             stats.getActiveRequestCountImpl().setLowWaterMark((long)statsHandler.getRequestsActiveMin());
             stats.getActiveRequestCountImpl().setHighWaterMark((long)statsHandler.getRequestsActiveMax());
     
-            /* set request duration average time */
-            stats.getRequestDurationAvgImpl().setCount((long)statsHandler.getRequestsDurationAve());
    // Normally this would be calculated
-    
-            /* set request duration time values */
-//            stats.getRequestDurationImpl().setCount((long)statsHandler.getRequestsDurationCount());
   Not yet supported by Jetty
+            /* set request duration time values, avg = Totaltime/Count */
+            /* set active request count */
+            stats.getRequestDurationImpl().setCount((long)statsHandler.getRequests());
             stats.getRequestDurationImpl().setMaxTime((long)statsHandler.getRequestsDurationMax());
             stats.getRequestDurationImpl().setMinTime((long)statsHandler.getRequestsDurationMin());
             stats.getRequestDurationImpl().setTotalTime((long)statsHandler.getRequestsDurationTotal());

Modified: geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/connector/JettyConnector.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/connector/JettyConnector.java?rev=605403&r1=605402&r2=605403&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/connector/JettyConnector.java
(original)
+++ geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/connector/JettyConnector.java
Tue Dec 18 19:27:20 2007
@@ -244,12 +244,10 @@
             stats.getOpenConnectionCountImpl().setCurrent(listener.getConnectionsOpen());
             stats.getOpenConnectionCountImpl().setHighWaterMark(listener.getConnectionsOpenMax());
             stats.getOpenConnectionCountImpl().setLowWaterMark(listener.getConnectionsOpenMin());
-            // connections count
-            stats.getConnectionsCountImpl().setCount(listener.getConnections());
             // request count
             stats.getRequestCountImpl().setCount(listener.getRequests());
-            // connections durations
-            stats.getConnectionsDurationImpl().setCount(listener.getConnectionsDurationAve());
+            // connections count and durations
+            stats.getConnectionsDurationImpl().setCount(listener.getConnections());
             stats.getConnectionsDurationImpl().setMaxTime(listener.getConnectionsDurationMax());
             stats.getConnectionsDurationImpl().setMinTime(listener.getConnectionsDurationMin());
             stats.getConnectionsDurationImpl().setTotalTime(listener.getConnectionsDurationTotal());



Mime
View raw message