Package org.apache.geronimo.management.stats

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


        public void prepareConsumers(Map clients) {
            Map result = new HashMap();
            for (Iterator it = clients.keySet().iterator(); it.hasNext();) {
                String client = (String) it.next();
                Integer count = (Integer) clients.get(client);
                CountStatisticImpl stat = (CountStatisticImpl) consumers.get(client);
                if (stat == null) {
                    stat = new CountStatisticImpl("Threads for " + client, "", "The number of threads used by the client known as '" + client + "'", count.intValue());
                    addStat(stat.getName(), stat);
                } else {
                    consumers.remove(client);
                    stat.setCount(count.intValue());
                }
                result.put(client, stat);
            }
            for (Iterator it = consumers.keySet().iterator(); it.hasNext();) {
                String client = (String) it.next();
View Full Code Here


                "The number of connections open at present");
        connectionRequestCount = new RangeStatisticImpl("Connection Request Count", StatisticImpl.UNIT_COUNT,
                "The number of requests handled by a particular connection");
        connectionDuration = new TimeStatisticImpl("Connection Duration", StatisticImpl.UNIT_TIME_MILLISECOND,
                "The legnth of time that individual connections have been open");
        totalErrorCount = new CountStatisticImpl("Error Count", StatisticImpl.UNIT_COUNT,
                "The number of reponses that were errors since statistics gathering started");
        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 legnth of time that it's taken to handle individual requests");
View Full Code Here

    private CountStatisticImpl statsOnMs;               // time elapsed since the stats collection

    private boolean statsOn=false;

    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,
                "The number of 2xx responses");
        response3xx = new CountStatisticImpl("Response 3xx", StatisticImpl.UNIT_COUNT,
                "The number of 3xx responses");
        response4xx = new CountStatisticImpl("Response 4xx", StatisticImpl.UNIT_COUNT,
                "The number of 4xx responses");
        response5xx = new CountStatisticImpl("Response 5xx", StatisticImpl.UNIT_COUNT,
                "The number of 5xx responses");
        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);
View Full Code Here

    public Stats getStats() {
        RuntimeMXBean runmxbean = ManagementFactory.getRuntimeMXBean();
        MemoryMXBean memmxbean = ManagementFactory.getMemoryMXBean();
        MemoryUsage memUsage = memmxbean.getHeapMemoryUsage();
        CountStatisticImpl upTime;
        BoundedRangeStatisticImpl heapSize;
       
        if (stats == null) {
            stats = new JVMStatsImpl();
            // setup UpTime CountStatistic
            upTime = stats.getUpTimeImpl();
            upTime.setStartTime(runmxbean.getStartTime());
            upTime.setCount(runmxbean.getUptime());
            // setup Heap BoundedRangeStatistic
            heapSize = stats.getHeapSizeImpl();
            heapSize.setStartTime(runmxbean.getStartTime());
            heapSize.setBounds(0, memUsage.getMax());
            heapSize.setCurrent(memUsage.getUsed());
            heapSize.setLowWaterMark(memUsage.getUsed());
            heapSize.setHighWaterMark(memUsage.getUsed());
        } else {
            // update UpTime CountStatistic
            upTime = stats.getUpTimeImpl();
            upTime.setCount(runmxbean.getUptime());
            // update Heap BoundedRangeStatistic
            heapSize = stats.getHeapSizeImpl();
            heapSize.setBounds(0, memUsage.getMax());
            heapSize.setCurrent(memUsage.getUsed());
        }
        long now = upTime.getStartTime() + upTime.getCount();
        upTime.setLastSampleTime(now);
        heapSize.setLastSampleTime(now);

        return stats;
    }
View Full Code Here

        public void prepareConsumers(Map clients) {
            Map result = new HashMap();
            for (Iterator it = clients.keySet().iterator(); it.hasNext();) {
                String client = (String) it.next();
                Integer count = (Integer) clients.get(client);
                CountStatisticImpl stat = (CountStatisticImpl) consumers.get(client);
                if (stat == null) {
                    stat = new CountStatisticImpl("Threads for " + client, "", "The number of threads used by the client known as '" + client + "'", count.intValue());
                    addStat(stat.getName(), stat);
                } else {
                    consumers.remove(client);
                    stat.setCount(count.intValue());
                }
                result.put(client, stat);
            }
            for (Iterator it = consumers.keySet().iterator(); it.hasNext();) {
                String client = (String) it.next();
View Full Code Here

    // TODO - spareThreads metrics = current - busy, maxSpareThreads, minSpareThreads

    public TomcatWebConnectorStatsImpl() {
        requestTime = new TimeStatisticImpl("Request Time", StatisticImpl.UNIT_TIME_MILLISECOND,
                "The time to process all requests");
        activeRequestCount = new CountStatisticImpl("Active Request Count", StatisticImpl.UNIT_COUNT,
                "currently active requests ", 0);
        errorCount = new CountStatisticImpl("Error Count", StatisticImpl.UNIT_COUNT,
                "The numbet of Errors during the observed period", 0);
        bytesSentCount = new CountStatisticImpl("Bytes Sent", StatisticImpl.UNIT_COUNT,
                "The number of bytes sent during the observerd period", 0);
        bytesReceivedCount = new CountStatisticImpl("Bytes Received", StatisticImpl.UNIT_COUNT,
                "The number of bytes received during the observerd period", 0);
        openConnectionCount = new RangeStatisticImpl("" + "Open Connections", StatisticImpl.UNIT_COUNT,
                "Range for connections opened during the observed period", 0); // all 0's
        busyThreads = new BoundedRangeStatisticImpl("Busy Threads", StatisticImpl.UNIT_COUNT,
                "BoundedRange for Threads currently busy serving requests", 0, 0, 0);
View Full Code Here

        public void prepareConsumers(Map clients) {
            Map result = new HashMap();
            for (Iterator it = clients.keySet().iterator(); it.hasNext();) {
                String client = (String) it.next();
                Integer count = (Integer) clients.get(client);
                CountStatisticImpl stat = (CountStatisticImpl) consumers.get(client);
                if (stat == null) {
                    stat = new CountStatisticImpl("Threads for " + client, "", "The number of threads used by the client known as '" + client + "'", count.intValue());
                    addStat(stat.getName(), stat);
                } else {
                    consumers.remove(client);
                    stat.setCount(count.intValue());
                }
                result.put(client, stat);
            }
            for (Iterator it = consumers.keySet().iterator(); it.hasNext();) {
                String client = (String) it.next();
View Full Code Here

    private CountStatisticImpl requestCount;
    private TimeStatisticImpl connectionsDuration;
    private RangeStatisticImpl connectionsRequest;
   
    public JettyWebConnectorStatsImpl() {
        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,
                "Duration of a connection");
        connectionsRequest = new RangeStatisticImpl("Connections Request", StatisticImpl.UNIT_COUNT,
                "Range for connections requested during the observed period", 0);       // all 0's
View Full Code Here

    // TODO - spareThreads metrics = current - busy, maxSpareThreads, minSpareThreads

    public TomcatWebConnectorStatsImpl() {
        requestTime = new TimeStatisticImpl("Request Time", StatisticImpl.UNIT_TIME_MILLISECOND,
                "The time to process all requests");
        activeRequestCount = new CountStatisticImpl("Active Request Count", StatisticImpl.UNIT_COUNT,
                "currently active requests ", 0);
        errorCount = new CountStatisticImpl("Error Count", StatisticImpl.UNIT_COUNT,
                "The numbet of Errors during the observed period", 0);
        bytesSentCount = new CountStatisticImpl("Bytes Sent", StatisticImpl.UNIT_COUNT,
                "The number of bytes sent during the observerd period", 0);
        bytesReceivedCount = new CountStatisticImpl("Bytes Received", StatisticImpl.UNIT_COUNT,
                "The number of bytes received during the observerd period", 0);
        openConnectionCount = new RangeStatisticImpl("" + "Open Connections", StatisticImpl.UNIT_COUNT,
                "Range for connections opened during the observed period", 0); // all 0's
        busyThreads = new BoundedRangeStatisticImpl("Busy Threads", StatisticImpl.UNIT_COUNT,
                "BoundedRange for Threads currently busy serving requests", 0, 0, 0);
View Full Code Here

    public JettyWebContainerStatsImpl() {
        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");
        response1xx = new CountStatisticImpl("Response 1xx", StatisticImpl.UNIT_COUNT,
                "The number of 1xx responses");
        response2xx = new CountStatisticImpl("Response 2xx", StatisticImpl.UNIT_COUNT,
                "The number of 2xx responses");
        response3xx = new CountStatisticImpl("Response 3xx", StatisticImpl.UNIT_COUNT,
                "The number of 3xx responses");
        response4xx = new CountStatisticImpl("Response 4xx", StatisticImpl.UNIT_COUNT,
                "The number of 4xx responses");
        response5xx = new CountStatisticImpl("Response 5xx", StatisticImpl.UNIT_COUNT,
                "The number of 5xx responses");
        statsOnMs = new CountStatisticImpl("Stats Duration", StatisticImpl.UNIT_TIME_MILLISECOND,
                "The length of time that statistics have been collected.");

        addStat("ActiveRequestCount", activeRequestCount);
        addStat("RequestDuration", requestDuration);
        addStat("Responses1xx", response1xx);
View Full Code Here

TOP

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

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.