Package org.apache.geronimo.management.geronimo.stats

Examples of org.apache.geronimo.management.geronimo.stats.WebContainerStats


                            populateStats=true;     // this is not a lazy provider so just populate the stats
                        }

                        if (populateStats) {
                            // get the detailed stats
                            WebContainerStats webStats = (WebContainerStats) ((StatisticsProvider)container).getStats();
                            //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()));
                           
                            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", 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()));
                            renderRequest.setAttribute("response4xx", new Long(webStats.getResponses4xx().getCount()));
                            renderRequest.setAttribute("response5xx", new Long(webStats.getResponses5xx().getCount()));
                            renderRequest.setAttribute("elapsedTime", TimeUtils.formatDuration(webStats.getStatsOnMs().getCount()));
                        }
                    } else {
                        renderRequest.setAttribute("statsSupported", Boolean.FALSE);   // indicate that statistics are not supported for this container
                        renderRequest.setAttribute("statsMessage", "Web statistics are not supported for the current web container.");
                    }
View Full Code Here


                WebManager manager = managers[0]//todo: handle multiple
                WebContainer[] containers = (WebContainer[]) manager.getContainers();
                if (containers != null) {
                    WebContainer container = containers[0]//todo: handle multiple
                    if(container.isStatisticsProvider()) {
                        WebContainerStats webStats = (WebContainerStats) ((StatisticsProvider)container).getStats();
                        if (webStats.isStatsOn()) {
                            renderRequest.setAttribute("statsOn", Boolean.TRUE);
                            renderRequest.setAttribute("totalRequestCount", new Long(webStats.getTotalRequestCount().getCount()));
                            renderRequest.setAttribute("totalConnectionCount", new Long(webStats.getTotalConnectionCount().getCount()));
                            renderRequest.setAttribute("totalErrorCount", new Long(webStats.getTotalErrorCount().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("connectionRequestCountCurrent", new Long(webStats.getConnectionRequestCount().getCurrent()));
                            renderRequest.setAttribute("connectionRequestCountLow", new Long(webStats.getConnectionRequestCount().getLowWaterMark()));
                            renderRequest.setAttribute("connectionRequestCountHigh", new Long(webStats.getConnectionRequestCount().getHighWaterMark()));
    //                          renderRequest.setAttribute("connectionRequestsAve", new Long(0));   /* Can't really compute this for a range ... do we still need it (from old portlet) */
                            renderRequest.setAttribute("openConnectionCountCurrent", new Long(webStats.getOpenConnectionCount().getCurrent()));
                            renderRequest.setAttribute("openConnectionCountLow", new Long(webStats.getOpenConnectionCount().getLowWaterMark()));
                            renderRequest.setAttribute("openConnectionCountHigh", new Long(webStats.getOpenConnectionCount().getHighWaterMark()));
                            renderRequest.setAttribute("requestDurationCount", new Long(webStats.getRequestDuration().getCount()));
                            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("requestDurationAve", new Long(0));  /* Would this be valuable to calculate?  We used to show this in the old jetty only portlet */
                            renderRequest.setAttribute("connectionDurationCount", new Long(webStats.getConnectionDuration().getCount()));
                            renderRequest.setAttribute("connectionDurationMinTime", new Long(webStats.getConnectionDuration().getMinTime()));
                            renderRequest.setAttribute("connectionDurationMaxTime", new Long(webStats.getConnectionDuration().getMaxTime()));
                            renderRequest.setAttribute("connectionDurationTotalTime", new Long(webStats.getConnectionDuration().getTotalTime()));
    //                          renderRequest.setAttribute("connectionDurationAve", new Long(0));   /* Wouldl this be valueable to calculate?  We used to show this in the old jetty only portlet */
                        } else {
                            renderRequest.setAttribute("statsSupported", Boolean.TRUE);
                            renderRequest.setAttribute("statsMessage", "Statistics are not currently being collected.");
                        }
View Full Code Here

                            populateStats=true;     // this is not a lazy provider so just populate the stats
                        }

                        if (populateStats) {
                            // get the detailed stats
                            WebContainerStats webStats = (WebContainerStats) ((StatisticsProvider)container).getStats();
                            //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()));
                           
                            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", 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()));
                            renderRequest.setAttribute("response4xx", new Long(webStats.getResponses4xx().getCount()));
                            renderRequest.setAttribute("response5xx", new Long(webStats.getResponses5xx().getCount()));
                            renderRequest.setAttribute("elapsedTime", TimeUtils.formatDuration(webStats.getStatsOnMs().getCount()));
                        }
                    } else {
                        renderRequest.setAttribute("statsSupported", Boolean.FALSE);   // indicate that statistics are not supported for this container
                        addWarningMessage(renderRequest, getLocalizedString(renderRequest, "warnMsg03"));
                    }
View Full Code Here

                            populateStats=true;     // this is not a lazy provider so just populate the stats
                        }

                        if (populateStats) {
                            // get the detailed stats
                            WebContainerStats webStats = (WebContainerStats) ((StatisticsProvider)container).getStats();
                            //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()));
                           
                            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", 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()));
                            renderRequest.setAttribute("response4xx", new Long(webStats.getResponses4xx().getCount()));
                            renderRequest.setAttribute("response5xx", new Long(webStats.getResponses5xx().getCount()));
                            renderRequest.setAttribute("elapsedTime", TimeUtils.formatDuration(webStats.getStatsOnMs().getCount()));
                        }
                    } else {
                        renderRequest.setAttribute("statsSupported", Boolean.FALSE);   // indicate that statistics are not supported for this container
                        addWarningMessage(renderRequest, getLocalizedString(renderRequest, "consolebase.warnMsg03"));
                    }
View Full Code Here

                            populateStats=true;     // this is not a lazy provider so just populate the stats
                        }

                        if (populateStats) {
                            // get the detailed stats
                            WebContainerStats webStats = (WebContainerStats) ((StatisticsProvider)container).getStats();
                            //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()));

                            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", totalTime);
                            // renderRequest.setAttribute("requestDurationAvg", new Long(webStats.getRequestDurationAvg().getCount()));
                            long avg = count == 0 ? 0 : totalTime / count;
                            renderRequest.setAttribute("requestDurationAvg", avg);
                            renderRequest.setAttribute("response1xx", Long.valueOf(webStats.getResponses1xx().getCount()));
                            renderRequest.setAttribute("response2xx", Long.valueOf(webStats.getResponses2xx().getCount()));
                            renderRequest.setAttribute("response3xx", Long.valueOf(webStats.getResponses3xx().getCount()));
                            renderRequest.setAttribute("response4xx", Long.valueOf(webStats.getResponses4xx().getCount()));
                            renderRequest.setAttribute("response5xx", Long.valueOf(webStats.getResponses5xx().getCount()));
                            renderRequest.setAttribute("elapsedTime", TimeUtils.formatDuration(webStats.getStatsOnMs().getCount()));
                        }
                    } else {
                        renderRequest.setAttribute("statsSupported", Boolean.FALSE);   // indicate that statistics are not supported for this container
                        addWarningMessage(renderRequest, getLocalizedString(renderRequest, "consolebase.warnMsg03"));
                    }
View Full Code Here

                WebManager manager = managers[0]//todo: handle multiple
                WebContainer[] containers = (WebContainer[]) manager.getContainers();
                if (containers != null) {
                    WebContainer container = containers[0]//todo: handle multiple
                    if(container.isStatisticsProvider()) {
                        WebContainerStats webStats = (WebContainerStats) ((StatisticsProvider)container).getStats();
                        if (webStats.isStatsOn()) {
                            renderRequest.setAttribute("statsOn", Boolean.TRUE);
                            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()));
                            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("response1xx", new Long(webStats.getResponses1xx().getCount()));
                            renderRequest.setAttribute("response2xx", new Long(webStats.getResponses2xx().getCount()));
                            renderRequest.setAttribute("response3xx", new Long(webStats.getResponses3xx().getCount()));
                            renderRequest.setAttribute("response4xx", new Long(webStats.getResponses4xx().getCount()));
                            renderRequest.setAttribute("response5xx", new Long(webStats.getResponses5xx().getCount()));
                            renderRequest.setAttribute("elapsedTime", TimeUtils.formatDuration(webStats.getStatsOnMs().getCount()));
                        } else {
                            renderRequest.setAttribute("statsSupported", Boolean.TRUE);
                            renderRequest.setAttribute("statsMessage", "Statistics are not currently being collected.");
                        }
                    } else {
View Full Code Here

                WebManager manager = managers[0]//todo: handle multiple
                WebContainer[] containers = (WebContainer[]) manager.getContainers();
                if (containers != null) {
                    WebContainer container = containers[0]//todo: handle multiple
                    if(container.isStatisticsProvider()) {
                        WebContainerStats webStats = (WebContainerStats) ((StatisticsProvider)container).getStats();
                        if (webStats.isStatsOn()) {
                            renderRequest.setAttribute("statsOn", Boolean.TRUE);
                            renderRequest.setAttribute("totalRequestCount", new Long(webStats.getTotalRequestCount().getCount()));
                            renderRequest.setAttribute("totalConnectionCount", new Long(webStats.getTotalConnectionCount().getCount()));
                            renderRequest.setAttribute("totalErrorCount", new Long(webStats.getTotalErrorCount().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("connectionRequestCountCurrent", new Long(webStats.getConnectionRequestCount().getCurrent()));
                            renderRequest.setAttribute("connectionRequestCountLow", new Long(webStats.getConnectionRequestCount().getLowWaterMark()));
                            renderRequest.setAttribute("connectionRequestCountHigh", new Long(webStats.getConnectionRequestCount().getHighWaterMark()));
    //                          renderRequest.setAttribute("connectionRequestsAve", new Long(0));   /* Can't really compute this for a range ... do we still need it (from old portlet) */
                            renderRequest.setAttribute("openConnectionCountCurrent", new Long(webStats.getOpenConnectionCount().getCurrent()));
                            renderRequest.setAttribute("openConnectionCountLow", new Long(webStats.getOpenConnectionCount().getLowWaterMark()));
                            renderRequest.setAttribute("openConnectionCountHigh", new Long(webStats.getOpenConnectionCount().getHighWaterMark()));
                            renderRequest.setAttribute("requestDurationCount", new Long(webStats.getRequestDuration().getCount()));
                            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("requestDurationAve", new Long(0));  /* Would this be valuable to calculate?  We used to show this in the old jetty only portlet */
                            renderRequest.setAttribute("connectionDurationCount", new Long(webStats.getConnectionDuration().getCount()));
                            renderRequest.setAttribute("connectionDurationMinTime", new Long(webStats.getConnectionDuration().getMinTime()));
                            renderRequest.setAttribute("connectionDurationMaxTime", new Long(webStats.getConnectionDuration().getMaxTime()));
                            renderRequest.setAttribute("connectionDurationTotalTime", new Long(webStats.getConnectionDuration().getTotalTime()));
    //                          renderRequest.setAttribute("connectionDurationAve", new Long(0));   /* Wouldl this be valueable to calculate?  We used to show this in the old jetty only portlet */
                        } else {
                            renderRequest.setAttribute("statsSupported", Boolean.TRUE);
                            renderRequest.setAttribute("statsMessage", "Statistics are not currently being collected.");
                        }
View Full Code Here

                WebManager manager = managers[0]//todo: handle multiple
                WebContainer[] containers = (WebContainer[]) manager.getContainers();
                if (containers != null) {
                    WebContainer container = containers[0]//todo: handle multiple
                    if(container.isStatisticsProvider()) {
                        WebContainerStats webStats = (WebContainerStats) ((StatisticsProvider)container).getStats();
                        if (webStats.isStatsOn()) {
                            renderRequest.setAttribute("statsOn", Boolean.TRUE);
                            renderRequest.setAttribute("totalRequestCount", new Long(webStats.getTotalRequestCount().getCount()));
                            renderRequest.setAttribute("totalConnectionCount", new Long(webStats.getTotalConnectionCount().getCount()));
                            renderRequest.setAttribute("totalErrorCount", new Long(webStats.getTotalErrorCount().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("connectionRequestCountCurrent", new Long(webStats.getConnectionRequestCount().getCurrent()));
                            renderRequest.setAttribute("connectionRequestCountLow", new Long(webStats.getConnectionRequestCount().getLowWaterMark()));
                            renderRequest.setAttribute("connectionRequestCountHigh", new Long(webStats.getConnectionRequestCount().getHighWaterMark()));
    //                          renderRequest.setAttribute("connectionRequestsAve", new Long(0));   /* Can't really compute this for a range ... do we still need it (from old portlet) */
                            renderRequest.setAttribute("openConnectionCountCurrent", new Long(webStats.getOpenConnectionCount().getCurrent()));
                            renderRequest.setAttribute("openConnectionCountLow", new Long(webStats.getOpenConnectionCount().getLowWaterMark()));
                            renderRequest.setAttribute("openConnectionCountHigh", new Long(webStats.getOpenConnectionCount().getHighWaterMark()));
                            renderRequest.setAttribute("requestDurationCount", new Long(webStats.getRequestDuration().getCount()));
                            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("requestDurationAve", new Long(0));  /* Would this be valuable to calculate?  We used to show this in the old jetty only portlet */
                            renderRequest.setAttribute("connectionDurationCount", new Long(webStats.getConnectionDuration().getCount()));
                            renderRequest.setAttribute("connectionDurationMinTime", new Long(webStats.getConnectionDuration().getMinTime()));
                            renderRequest.setAttribute("connectionDurationMaxTime", new Long(webStats.getConnectionDuration().getMaxTime()));
                            renderRequest.setAttribute("connectionDurationTotalTime", new Long(webStats.getConnectionDuration().getTotalTime()));
    //                          renderRequest.setAttribute("connectionDurationAve", new Long(0));   /* Wouldl this be valueable to calculate?  We used to show this in the old jetty only portlet */
                        } else {
                            renderRequest.setAttribute("statsSupported", Boolean.TRUE);
                            renderRequest.setAttribute("statsMessage", "Statistics are not currently being collected.");
                        }
View Full Code Here

                WebManager manager = managers[0]//todo: handle multiple
                WebContainer[] containers = (WebContainer[]) manager.getContainers();
                if (containers != null) {
                    WebContainer container = containers[0]//todo: handle multiple
                    if(container.isStatisticsProvider()) {
                        WebContainerStats webStats = (WebContainerStats) ((StatisticsProvider)container).getStats();
                        if (webStats.isStatsOn()) {
                            renderRequest.setAttribute("statsOn", Boolean.TRUE);
                            renderRequest.setAttribute("totalRequestCount", new Long(webStats.getTotalRequestCount().getCount()));
                            renderRequest.setAttribute("totalConnectionCount", new Long(webStats.getTotalConnectionCount().getCount()));
                            renderRequest.setAttribute("totalErrorCount", new Long(webStats.getTotalErrorCount().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("connectionRequestCountCurrent", new Long(webStats.getConnectionRequestCount().getCurrent()));
                            renderRequest.setAttribute("connectionRequestCountLow", new Long(webStats.getConnectionRequestCount().getLowWaterMark()));
                            renderRequest.setAttribute("connectionRequestCountHigh", new Long(webStats.getConnectionRequestCount().getHighWaterMark()));
    //                          renderRequest.setAttribute("connectionRequestsAve", new Long(0));   /* Can't really compute this for a range ... do we still need it (from old portlet) */
                            renderRequest.setAttribute("openConnectionCountCurrent", new Long(webStats.getOpenConnectionCount().getCurrent()));
                            renderRequest.setAttribute("openConnectionCountLow", new Long(webStats.getOpenConnectionCount().getLowWaterMark()));
                            renderRequest.setAttribute("openConnectionCountHigh", new Long(webStats.getOpenConnectionCount().getHighWaterMark()));
                            renderRequest.setAttribute("requestDurationCount", new Long(webStats.getRequestDuration().getCount()));
                            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("requestDurationAve", new Long(0));  /* Would this be valuable to calculate?  We used to show this in the old jetty only portlet */
                            renderRequest.setAttribute("connectionDurationCount", new Long(webStats.getConnectionDuration().getCount()));
                            renderRequest.setAttribute("connectionDurationMinTime", new Long(webStats.getConnectionDuration().getMinTime()));
                            renderRequest.setAttribute("connectionDurationMaxTime", new Long(webStats.getConnectionDuration().getMaxTime()));
                            renderRequest.setAttribute("connectionDurationTotalTime", new Long(webStats.getConnectionDuration().getTotalTime()));
    //                          renderRequest.setAttribute("connectionDurationAve", new Long(0));   /* Wouldl this be valueable to calculate?  We used to show this in the old jetty only portlet */
                        } else {
                            renderRequest.setAttribute("statsSupported", Boolean.TRUE);
                            renderRequest.setAttribute("statsMessage", "Statistics are not currently being collected.");
                        }
View Full Code Here

                            populateStats=true;     // this is not a lazy provider so just populate the stats
                        }

                        if (populateStats) {
                            // get the detailed stats
                            WebContainerStats webStats = (WebContainerStats) ((StatisticsProvider)container).getStats();
                            //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()));
                           
                            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", 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()));
                            renderRequest.setAttribute("response4xx", new Long(webStats.getResponses4xx().getCount()));
                            renderRequest.setAttribute("response5xx", new Long(webStats.getResponses5xx().getCount()));
                            renderRequest.setAttribute("elapsedTime", TimeUtils.formatDuration(webStats.getStatsOnMs().getCount()));
                        }
                    } else {
                        renderRequest.setAttribute("statsSupported", Boolean.FALSE);   // indicate that statistics are not supported for this container
                        addWarningMessage(renderRequest, getLocalizedString(renderRequest, "consolebase.warnMsg03"));
                    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.management.geronimo.stats.WebContainerStats

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.