cvs: pecl /apd pprofp

From: Date: Wed, 10 Mar 2004 18:35:07 +0000
Subject: cvs: pecl /apd pprofp
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-1044@lists.php.net to get a copy of this message
gschlossnagle Wed Mar 10 13:35:07 2004 EDT Modified files: /pecl/apd pprofp Log: Fixed time aggregarion error introdcued with per-line timings http://cvs.php.net/diff.php/pecl/apd/pprofp?r1=1.12&r2=1.13&ty=u Index: pecl/apd/pprofp diff -u pecl/apd/pprofp:1.12 pecl/apd/pprofp:1.13 --- pecl/apd/pprofp:1.12 Tue Dec 23 20:13:21 2003 +++ pecl/apd/pprofp Wed Mar 10 13:35:07 2004 @@ -100,7 +100,20 @@ continue; } if( $token == '@') { - list($t_utime, $t_stime, $t_rtime) = preg_split("/ /", $data); + list($file_no, $line_no, $ut, $st, $rt) = preg_split("/ /", $data); + $top = array_pop($callstack); + $utimes[$top] += $ut; + $utotal += $ut; + $stimes[$top] += $st; + $stotal += $st; + $rtimes[$top] += $rt; + $rtotal += $rt; + array_push($callstack, $top); + foreach ($callstack as $stack_element) { + $c_utimes[$stack_element] += $ut; + $c_stimes[$stack_element] += $st; + $c_rtimes[$stack_element] += $rt; + } continue; } if ($token == '-') { @@ -112,26 +125,6 @@ $mem[$index] += ($memory - $last_memory); $last_memory = $memory; $indent_cur--; - $utimes[$index] += $t_utime; - $utotal += $t_utime; - $stimes[$index] += $t_stime; - $stotal += $t_stime; - $rtimes[$index] += $t_rtime; - $rtotal += $t_rtime; - $seen = array(); - foreach ($callstack as $stack_element) { - if(array_key_exists($stack_element, $seen)){ - continue; - } - $seen[$stack_element] = 1; - $c_utimes[$stack_element] += $t_utime; - $c_stimes[$stack_element] += $t_stime; - $c_rtimes[$stack_element] += $t_rtime; - } - $t_utime = 0; - $t_stime = 0; - $t_rtime = 0; - $tmp = array_pop($callstack); continue; }

« previous php.pecl.cvs (#1044) next »