Examples of MethodCallCounterRecord


Examples of com.jitlogic.zorka.common.tracedata.MethodCallCounterRecord

        List<MethodCallCounterRecord> ret = new ArrayList<MethodCallCounterRecord>();

        for (int i = 0; i < keys.length; i++) {
            long key = keys[i];
            if (key != FREE) {
                ret.add(new MethodCallCounterRecord((int) (key & MASK), (int) ((key >> 21) & MASK), (int) ((key >> 42) & MASK), vals[i]));
            }
        }

        return ret;
    }
View Full Code Here

Examples of com.jitlogic.zorka.common.tracedata.MethodCallCounterRecord

        List<Integer> counters = new ArrayList<Integer>();

        // Generate some initial data
        for (int i = 0; i < 10000; i++) {

            MethodCallCounterRecord rec = new MethodCallCounterRecord(
                    r.nextInt(1500000) + 1, r.nextInt(1500000) + 2, r.nextInt(1500000) + 3, r.nextInt(10) + 1);

            recs.add(rec);
            counters.add(0);
        }

        MethodCallCounter mcc = new MethodCallCounter();

        // Fill in method call counter
        while (true) {
            int incs = 0;

            for (int i = 0; i < recs.size(); i++) {
                MethodCallCounterRecord rec = recs.get(i);
                if (counters.get(i) < rec.getnCalls()) {
                    mcc.logCall(rec.getClassId(), rec.getMethodId(), rec.getSignatureId(), 10L);
                    counters.set(i, counters.get(i) + 1);
                    incs++;
                }
            }

            if (incs == 0) {
                break;
            }
        }

        Set<MethodCallCounterRecord> results = new HashSet<MethodCallCounterRecord>();
        results.addAll(mcc.getRecords());

        // Indicate (potential) errors
        for (MethodCallCounterRecord mcr : recs) {
            if (!results.contains(mcr)) {
                MethodCallCounterRecord mcrr = null;
                for (MethodCallCounterRecord mcr2 : results) {
                    if (mcr2.getClassId() == mcr.getClassId() && mcr2.getMethodId() == mcr.getMethodId()
                            && mcr2.getSignatureId() == mcr.getSignatureId()) {
                        mcrr = mcr2;
                        break;
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.