Examples of AScalarDataPoint


Examples of com.ajjpj.asysmon.data.AScalarDataPoint

    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, AScalarDataPoint> data, long timestamp) {
        data.put(IDENT_MEM_FREE, new AScalarDataPoint(timestamp, IDENT_MEM_FREE, Runtime.getRuntime().freeMemory(), 0));
        data.put(IDENT_MEM_TOTAL, new AScalarDataPoint(timestamp, IDENT_MEM_TOTAL, Runtime.getRuntime().totalMemory(), 0));
        data.put(IDENT_MEM_MAX, new AScalarDataPoint(timestamp, IDENT_MEM_MAX, Runtime.getRuntime().maxMemory(), 0));
        data.put(IDENT_MEM_USED, new AScalarDataPoint(timestamp, IDENT_MEM_USED, Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory(), 0));
    }
View Full Code Here

Examples of com.ajjpj.asysmon.data.AScalarDataPoint

            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 AScalarDataPoint(timestamp, IDENT_LOAD_1_MIN, load1, 2));
            result.put(IDENT_LOAD_5_MIN, new AScalarDataPoint(timestamp, IDENT_LOAD_5_MIN, load5, 2));
            result.put(IDENT_LOAD_15_MIN, new AScalarDataPoint(timestamp, IDENT_LOAD_15_MIN, load15, 2));
        }
        catch(Exception exc) { // do nothing
        }
    }
View Full Code Here

Examples of com.ajjpj.asysmon.data.AScalarDataPoint

        final long usedJiffies = availJiffies - idleJiffies;

        final long usedPerMill = usedJiffies * 10;

        data.put(KEY_AVAILABLE, new AScalarDataPoint(timestamp, KEY_AVAILABLE, availJiffies / (diffTime / 10) * 1000, 1));
        data.put(KEY_ALL_USED, new AScalarDataPoint(timestamp, KEY_ALL_USED, usedPerMill, 1));

        contributeFreq(data, timestamp);
    }
View Full Code Here

Examples of com.ajjpj.asysmon.data.AScalarDataPoint

            counter.get(mhz).incrementAndGet();
        }

        for(String mhz: counter.keySet()) {
            final String key = KEY_PREFIX_MHZ + mhz;
            data.put(key, new AScalarDataPoint(timestamp, key, counter.get(mhz).intValue(), 0));
        }
    }
View Full Code Here

Examples of com.ajjpj.asysmon.data.AScalarDataPoint

        final long kernelJiffies = current.kernelJiffies - prev.kernelJiffies;

        final long userPerMill = userJiffies * 10*1000 / diffTime;
        final long kernelPerMill = kernelJiffies * 10*1000 / diffTime;

        data.put(KEY_SELF_USER, new AScalarDataPoint(timestamp, KEY_SELF_USER, userPerMill, 1));
        data.put(KEY_SELF_KERNEL, new AScalarDataPoint(timestamp, KEY_SELF_KERNEL, kernelPerMill, 1));
    }
View Full Code Here

Examples of com.ajjpj.asysmon.data.AScalarDataPoint

            final long sentPackets     = cur.packetsSent.    get(iface) - prev.packetsSent.    get(iface);
            final long collisions      = cur.collisions.     get(iface) - prev.collisions.     get(iface);

            {
                final String key = getKeyReceivedBytes(iface);
                data.put(key, new AScalarDataPoint(timestamp, key, receivedBytes * 10*1000 / diffTime, 1));
            }
            {
                final String key = getKeyReceivedPackets(iface);
                data.put(key, new AScalarDataPoint(timestamp, key, receivedPackets * 10*1000 / diffTime, 1));
            }
            {
                final String key = getKeySentBytes(iface);
                data.put(key, new AScalarDataPoint(timestamp, key, sentBytes * 10*1000 / diffTime, 1));
            }
            {
                final String key = getKeySentPackets(iface);
                data.put(key, new AScalarDataPoint(timestamp, key, sentPackets * 10*1000 / diffTime, 1));
            }
            {
                final String key = getKeyCollisions(iface);
                data.put(key, new AScalarDataPoint(timestamp, key, collisions * 10*1000 / diffTime, 1));
            }
        }
    }
View Full Code Here

Examples of com.ajjpj.asysmon.data.AScalarDataPoint

        }
        return 512;
    }

    private void add(Map<String, AScalarDataPoint> data, long timestamp, String key, long value, int numFracDigits) {
        data.put(key, new AScalarDataPoint(timestamp, key, value, numFracDigits));
    }
View Full Code Here

Examples of com.ajjpj.asysmon.data.AScalarDataPoint

        while ((candidate = traceQueue.poll()) != null) { //TODO limit number per HTTP request?!
            traces.add(candidate);
        }

        final List<AScalarDataPoint> scalars = new ArrayList<AScalarDataPoint>();
        AScalarDataPoint scalar;
        while ((scalar = scalarQueue.poll()) != null) { //TODO limit number per HTTP request?
            scalars.add(scalar);
        }

        if(traces.isEmpty() && scalars.isEmpty()) {
View Full Code Here

Examples of com.ajjpj.asysmon.data.AScalarDataPoint

        final long usedJiffies = availJiffies - idleJiffies;

        final long usedPerMill = usedJiffies * 10;

        data.put(KEY_AVAILABLE, new AScalarDataPoint(timestamp, KEY_AVAILABLE, availJiffies / (diffTime / 10) * 1000, 1));
        data.put(KEY_ALL_USED, new AScalarDataPoint(timestamp, KEY_ALL_USED, usedPerMill, 1));

        contributeFreq(data, timestamp);
    }
View Full Code Here

Examples of com.ajjpj.asysmon.data.AScalarDataPoint

            counter.get(mhz).incrementAndGet();
        }

        for(String mhz: counter.keySet()) {
            final String key = KEY_PREFIX_MHZ + mhz;
            data.put(key, new AScalarDataPoint(timestamp, key, counter.get(mhz).intValue(), 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.