Why does the Function Detail window show percentages over 100%?

If a function, procedure, or method (collectively referred to here as functions) calls itself recursively, either directly or indirectly, the values reported for descendants in the Function Detail window can exceed 100%. To understand how this situation can arise, consider the following calling sequence, where function A is indirectly recursive. The time spent in each call appears in parentheses.

Main --> A (32) --> B (60) --> C (70) --> A (32) --> D (80)

Quantify reports the following times for A and its descendants:

Function

Function time

F+D time

A

64 (= 32+32)

274 (=32+60+70+32+80)

B

60

242 (= 60+70+32+80)

C

70

182 (= 70+32+80)

D

80

80

Notice that when Quantify calculates A's function+descendants (F+D) time, it does not simply add together A's function time (64) and the F+D time of its descendants (242+80), as that would double-count the time of the recursive call.

Quantify reports the following data for A's callers:


Callers

Propagated
time

Percentage of A's
F+D time

Main

274 (=32+60+70+32+80) 

100%

C

112 (= 32+80)

40%

The time propagated from A up to Main includes both the direct and the recursive call to A. The time propagated from A up to C also includes the recursive call. Since the recursive call is propagated to both callers, the total propagated time, 386 (= 274+112), exceeds A's F+D time, and the total percentage exceeds 100% of the A's F+D time.

Quantify reports the following data for A's descendants:


Descendants

Propagated
time

Percentage of A's
F+D time

B

242 (=60+70+32+80)

88%

D

80

29%

The propagated time from B includes the recursive call to A. Since the time spent in the call to D is attributed to both descendants, the total percentage exceeds 100%.

(C) Copyright IBM Corporation 1993, 2009.