public List statistic() {
        List result = new LinkedList();
        for (Iterator iter = calls.keySet().iterator(); iter.hasNext();) {
            Object[] line = new Object[3];
            result.add(line);
            line[0] = iter.next();
            List times = (List) calls.get(line[0]);
            line[1] = times.size() / 2;
            int accTime = 0;
            for (Iterator it = times.iterator(); it.hasNext();) {
                Long start = (Long) it.next();
                Long end = (Long) it.next();
                accTime += end - start;
            }
            line[2] = (long) accTime;
        }
        return result;
    }
public List statistic ( ) { List result = new LinkedList ( ) ; for ( Iterator iter = calls . keySet ( ) . iterator ( ) ; iter . hasNext ( ) ; ) { Object [ ] line = new Object [ 3 ] ; result . add ( line ) ; line [ 0 ] = iter . next ( ) ; List times = ( List ) calls . get ( line [ 0 ] ) ; line [ 1 ] = times . size ( ) / 2 ; int accTime = 0 ; for ( Iterator it = times . iterator ( ) ; it . hasNext ( ) ; ) { Long start = ( Long ) it . next ( ) ; Long end = ( Long ) it . next ( ) ; accTime += end - start ; } line [ 2 ] = ( long ) accTime ; } return result ; }
Returns benchmark statistics as a List&lt;Object[]&gt;.
AccumulateTime is measured in milliseconds and is as accurate as
System.currentTimeMillis() allows it to be.
@return a list of lines, each item is [methodname, numberOfCalls, accumulatedTime]