Code Execution Report



Method paintEntries was recursively called with recursion depth of 11. It was called total 1846 times with maximum calls from itself as direct recursion. It made total 25683 outgoing calls with maximum calls to method getScaledSize. It took 65.603 ms.

Method Calls

Method paintEntries is a direct recursive method which was called 1846 times out of which 1845 times it was recursive. It was called non-recursively only 1 time by method paint.

Method paintEntries made 25683 calls out of which 1845 calls were direct recursive to itself. It made 23838 calls to 17 methods. It made maximum 3691 calls to method getScaledSize.

Recursion depth of method paintEntries went up to 11 levels . It reached depth level 9 maximum times which was 498.

Time Consumption

Method paintEntries took 65.60 ms , out of which 33.03 ms were consumed as self time and 32.57 ms by outgoing calls made to 17 methods. Outgoing calls made to method drawRect took maximum time which was 24.11 ms . Please note the measurements are uncertain due to short runtime of outgoing calls.

 * Computes the position of entries and paints them on the canvas.
private void paintEntries(Entry entry, boolean splitHorizontal, Graphics g) {
    if (entry.getScaledSize() == 0) return;
    try {
        SingleFile sf = (SingleFile) entry;
        drawRect(g, sf);
    } catch (ClassCastException e) {
        Dir dir = (Dir) entry;
        float x = dir.getX();
        float y = dir.getY();
        float dirSize = dir.getScaledSize();
        for (Iterator iter = dir.getFiles().iterator(); iter.hasNext(); ) {
            Entry element = (Entry);
            float d = element.getScaledSize() / dirSize;
            if (splitHorizontal) {
                element.setW(d * dir.getW());
                x += element.getW();
            } else {
                element.setH(d * dir.getH());
                y += element.getH();
            paintEntries(element, !splitHorizontal, g);