Advanced Rails - Building Industrial-Strength Web Apps in Record Time

(Tuis.) #1
Rails Optimization Example | 157

The meaning of theCallscolumn is different for different rows. For the primary row
within a block, it simply refers to the total number of calls to the function. For the par-
ent rows, it takes the formcalls/total, wherecallsis the number of times the parent
function called the current function andtotalis the total number of times the current
function was called. Note that since all functions calling the current function are par-
ents, thecalls values of all parents will sum to thecalls value of the current function.


For child rows, the semantics are the same, but they are from the child’s point of
view. Thecallsvalue of a child row is the number of times the current function calls
the child function, as a fraction of the total number of times the child function was
called. The denominator of this number will be the same as thecallsvalue for the
child function’s own block. This gives a picture of how much impact the current
function has on the child, relative to the child’s other callers.


Figure 6-2. Beginning of a graph profile

Free download pdf