APD output opinion poll

From: Date: Mon, 02 Dec 2002 20:15:28 +0000
Subject: APD output opinion poll
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-11307@lists.php.net to get a copy of this message
Following a feature request at Apachecon, memory usage profiling was added back into apd and incorporated into the pprof output. This produces some pretty icky results though. The problem is that with garbage collection in php, your memory allocation fluctuates throughout the life of your script, and it's 'normal' to have subroutines which use a negative amount of memory (since the total memeory usage is lower at their exit than it was at their entrance. Current output looks like this: Trace for /home/foo/phpweb/index.php
Total Elapsed Time =    0.34
Total System Time  =    0.01
Total User Time    =    0.07
        Real         User        System             secs/    cumm
%Time (excl/cumm)  (excl/cumm)  (excl/cumm) Calls    call    s/call Memory Usage Name
------------------------------------------------------------------------------------------------
37.5  0.03  0.03   0.03  0.03   0.00  0.00   182   0.0002    0.00       112064 fgetcsv
37.5  0.03  0.03   0.02  0.02   0.01  0.01     7   0.0043    0.00       298384 require_once
12.5  0.01  0.01   0.01  0.01   0.00  0.00     4   0.0025    0.00          224 each
12.5  0.01  0.01   0.01  0.01   0.00  0.00    95   0.0001    0.00       -48856 stripslashes
 0.0  0.00  0.00   0.00  0.00   0.00  0.00     1   0.0000    0.00          -72 make_submit
 0.0  0.00  0.00   0.00  0.00   0.00  0.00     1   0.0000    0.00          136 htmlspecialchars
 0.0  0.11  0.11   0.00  0.00   0.00  0.00     7   0.0000    0.00         -120 printf
 0.0  0.00  0.11   0.00  0.00   0.00  0.00     7   0.0000    0.00          112 spacer
 0.0  0.05  0.05   0.00  0.00   0.00  0.00     6   0.0000    0.00         3704 getimagesize
 0.0  0.00  0.00   0.00  0.00   0.00  0.00    20   0.0000    0.00         -624 print_link
 0.0  0.00  0.00   0.00  0.00   0.00  0.00    10   0.0000    0.00         -552 delim
 0.0  0.00  0.00   0.00  0.00   0.00  0.00     9   0.0000    0.00           72 hdelim
 0.0  0.00  0.00   0.00  0.00   0.00  0.00     1   0.0000    0.00          -16 commonfooter
 0.0  0.00  0.00   0.00  0.00   0.00  0.00     1   0.0000    0.00           24 have_stats
 0.0  0.00  0.00   0.00  0.00   0.00  0.00     1   0.0000    0.00          -16 mirror_provider_url
 0.0  0.00  0.00   0.00  0.00   0.00  0.00     1   0.0000    0.00          112 mirror_provider
 0.0  0.00  0.00   0.00  0.00   0.00  0.00     2   0.0000    0.00          128 number_format
 0.0  0.04  0.04   0.00  0.00   0.00  0.00     2   0.0000    0.00          168 filesize
 0.0  0.00  0.05   0.00  0.00   0.00  0.00     6   0.0000    0.00          208 make_image
 0.0  0.00  0.04   0.00  0.00   0.00  0.00     2   0.0000    0.00            0 download_link
While I think the memory numbers are still useful, I know there must be a better way to represent this. Any thoughts from anyone using apd on how to affect this?

« previous php.pear.dev (#11307) next »