Examples of AGlobalDataPoint


Examples of com.ajjpj.asysmon.data.AGlobalDataPoint

    }

    @Override public void contributeMeasurements(Map<String, AGlobalDataPoint> data) {
        for(String key: openPerConnectionPool.keySet()) {
            final String ident = (DEFAULT_POOL_IDENTIFIER == key) ? "Open JDBC Connections" : ("Open JDBC Connections (" + key + ")");
            data.put(ident, new AGlobalDataPoint(ident, openPerConnectionPool.get(key).get(), 0));
        }
        for(String key: activePerConnectionPool.keySet()) {
            final String ident = (DEFAULT_POOL_IDENTIFIER == key) ? "Active JDBC Connections" : ("Active JDBC Connections (" + key + ")");
            data.put(ident, new AGlobalDataPoint(ident, activePerConnectionPool.get(key).get(), 0));
        }
    }
View Full Code Here

Examples of com.ajjpj.asysmon.data.AGlobalDataPoint

    }

    @Override public void contributeMeasurements(Map<String, AGlobalDataPoint> data) {
        for(String key: perConnectionPool.keySet()) {
            final String ident = (DEFAULT_POOL_IDENTIFIER == key) ? "Default Connection Pool" : ("Connection Pool " + key);
            data.put(ident, new AGlobalDataPoint(ident, perConnectionPool.get(key).get(), 0));
        }
    }
View Full Code Here

Examples of com.ajjpj.asysmon.data.AGlobalDataPoint

        final Map<String, AGlobalDataPoint> allData = new TreeMap<String, AGlobalDataPoint>(getSysMon().getGlobalMeasurements());

        out.println("<table class='global-measurements'>");

        // special handling for system load
        final AGlobalDataPoint load1  = allData.remove(ASystemLoadMeasurer.IDENT_LOAD_1_MIN);
        final AGlobalDataPoint load5  = allData.remove(ASystemLoadMeasurer.IDENT_LOAD_5_MIN);
        final AGlobalDataPoint load15 = allData.remove(ASystemLoadMeasurer.IDENT_LOAD_15_MIN);

        final String sLoad1  = load1  != null ? getDecimalFormat(load1. getNumFracDigits()).format(load1. getValue()) : "N/A";
        final String sLoad5  = load5  != null ? getDecimalFormat(load5. getNumFracDigits()).format(load5. getValue()) : "N/A";
        final String sLoad15 = load15 != null ? getDecimalFormat(load15.getNumFracDigits()).format(load15.getValue()) : "N/A";

        //TODO color code system load

        writeGlobalMeasurement(out, "System Load", sLoad1 + " / " + sLoad5 + " / " + sLoad15);

        // special handling for memory
        final AGlobalDataPoint memUsed = allData.remove(AMemoryMeasurer.IDENT_MEM_USED);
        final AGlobalDataPoint memTotal = allData.remove(AMemoryMeasurer.IDENT_MEM_TOTAL);
        final AGlobalDataPoint memMax = allData.remove(AMemoryMeasurer.IDENT_MEM_MAX);
        allData.remove(AMemoryMeasurer.IDENT_MEM_FREE);

        final int MEGA = 1024*1024;
        final String sMemUsed  = memUsed  != null ? (getDecimalFormat(memUsed. getNumFracDigits()).format(memUsed. getValue() / MEGA) + "M") : "N/A";
        final String sMemTotal = memTotal != null ? (getDecimalFormat(memTotal.getNumFracDigits()).format(memTotal.getValue() / MEGA) + "M") : "N/A";
        final String sMemMax   = memMax   != null ? (getDecimalFormat(memMax.  getNumFracDigits()).format(memMax.  getValue() / MEGA) + "M") : "N/A";

        //TODO color code memory usage

        writeGlobalMeasurement(out, "Memory", sMemUsed + " / " + sMemTotal + " / " + sMemMax);

View Full Code Here

Examples of com.ajjpj.asysmon.data.AGlobalDataPoint

    public static final String IDENT_MEM_USED = "mem-used";
    public static final String IDENT_MEM_TOTAL = "mem-total";
    public static final String IDENT_MEM_MAX   = "mem-max";

    @Override public void contributeMeasurements(Map<String, AGlobalDataPoint> data) {
        data.put(IDENT_MEM_FREE, new AGlobalDataPoint(IDENT_MEM_FREE, Runtime.getRuntime().freeMemory(), 0));
        data.put(IDENT_MEM_TOTAL, new AGlobalDataPoint(IDENT_MEM_TOTAL, Runtime.getRuntime().totalMemory(), 0));
        data.put(IDENT_MEM_MAX, new AGlobalDataPoint(IDENT_MEM_MAX, Runtime.getRuntime().maxMemory(), 0));
        data.put(IDENT_MEM_USED, new AGlobalDataPoint(IDENT_MEM_USED, Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory(), 0));
    }
View Full Code Here

Examples of com.ajjpj.asysmon.data.AGlobalDataPoint

            final int load1 = (int)(Double.parseDouble(raw[0])*100);
            final int load5 = (int)(Double.parseDouble(raw[1])*100);
            final int load15 = (int)(Double.parseDouble(raw[2])*100);

            result.put(IDENT_LOAD_1_MIN, new AGlobalDataPoint(IDENT_LOAD_1_MIN, load1, 2));
            result.put(IDENT_LOAD_5_MIN, new AGlobalDataPoint(IDENT_LOAD_5_MIN, load5, 2));
            result.put(IDENT_LOAD_15_MIN, new AGlobalDataPoint(IDENT_LOAD_15_MIN, load15, 2));
        }
        catch(Exception exc) { // do nothing
        }
    }
View Full Code Here

Examples of com.ajjpj.asysmon.data.AGlobalDataPoint

    @Override
    public void contributeMeasurements(Map<String, AGlobalDataPoint> data) {
        for(Map.Entry<String, AtomicInteger> entry: counter.getThreadCounts().entrySet()) {
            final String ident = "Thread Pool " + entry.getKey();
            data.put(ident, new AGlobalDataPoint(ident, entry.getValue().get(), 0));
        }
    }
View Full Code Here

Examples of com.ajjpj.asysmon.data.AGlobalDataPoint

        final Map<String, AGlobalDataPoint> allData = new TreeMap<String, AGlobalDataPoint>(getSysMon().getGlobalMeasurements());

        out.println("<table class='global-measurements'>");

        // special handling for system load
        final AGlobalDataPoint load1  = allData.remove(ASystemLoadMeasurer.IDENT_LOAD_1_MIN);
        final AGlobalDataPoint load5  = allData.remove(ASystemLoadMeasurer.IDENT_LOAD_5_MIN);
        final AGlobalDataPoint load15 = allData.remove(ASystemLoadMeasurer.IDENT_LOAD_15_MIN);

        final String sLoad1  = load1  != null ? getDecimalFormat(load1. getNumFracDigits()).format(load1. getValue()) : "N/A";
        final String sLoad5  = load5  != null ? getDecimalFormat(load5. getNumFracDigits()).format(load5. getValue()) : "N/A";
        final String sLoad15 = load15 != null ? getDecimalFormat(load15.getNumFracDigits()).format(load15.getValue()) : "N/A";

        //TODO color code system load

        writeGlobalMeasurement(out, "System Load", sLoad1 + " / " + sLoad5 + " / " + sLoad15);

        // special handling for memory
        final AGlobalDataPoint memUsed = allData.remove(AMemoryMeasurer.IDENT_MEM_USED);
        final AGlobalDataPoint memTotal = allData.remove(AMemoryMeasurer.IDENT_MEM_TOTAL);
        final AGlobalDataPoint memMax = allData.remove(AMemoryMeasurer.IDENT_MEM_MAX);
        allData.remove(AMemoryMeasurer.IDENT_MEM_FREE);

        final int MEGA = 1024*1024;
        final String sMemUsed  = memUsed  != null ? (getDecimalFormat(memUsed. getNumFracDigits()).format(memUsed. getValue() / MEGA) + "M") : "N/A";
        final String sMemTotal = memTotal != null ? (getDecimalFormat(memTotal.getNumFracDigits()).format(memTotal.getValue() / MEGA) + "M") : "N/A";
        final String sMemMax   = memMax   != null ? (getDecimalFormat(memMax.  getNumFracDigits()).format(memMax.  getValue() / MEGA) + "M") : "N/A";

        //TODO color code memory usage

        writeGlobalMeasurement(out, "Memory", sMemUsed + " / " + sMemTotal + " / " + sMemMax);

View Full Code Here

Examples of com.ajjpj.asysmon.data.AGlobalDataPoint

    }

    @Override public void contributeMeasurements(Map<String, AGlobalDataPoint> data) {
        for(String key: openPerConnectionPool.keySet()) {
            final String ident = (DEFAULT_POOL_IDENTIFIER == key) ? "Open JDBC Connections" : ("Open JDBC Connections (" + key + ")");
            data.put(ident, new AGlobalDataPoint(ident, openPerConnectionPool.get(key).get(), 0));
        }
        for(String key: activePerConnectionPool.keySet()) {
            final String ident = (DEFAULT_POOL_IDENTIFIER == key) ? "Active JDBC Connections" : ("Active JDBC Connections (" + key + ")");
            data.put(ident, new AGlobalDataPoint(ident, activePerConnectionPool.get(key).get(), 0));
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.