Index: trunk/phase3/includes/profiler/ProfilerSimple.php |
— | — | @@ -115,13 +115,4 @@ |
116 | 116 | return 0; |
117 | 117 | } |
118 | 118 | } |
119 | | - |
120 | | - /* If argument is passed, it assumes that it is dual-format time string, returns proper float time value */ |
121 | | - function getTime($time=null) { |
122 | | - if ($time==null) { |
123 | | - return microtime(true); |
124 | | - } |
125 | | - list($a,$b)=explode(" ",$time); |
126 | | - return (float)($a+$b); |
127 | | - } |
128 | 119 | } |
Index: trunk/phase3/includes/profiler/Profiler.php |
— | — | @@ -150,12 +150,12 @@ |
151 | 151 | if( $functionname == 'close' ){ |
152 | 152 | $message = "Profile section ended by close(): {$bit[0]}"; |
153 | 153 | $this->debug( "$message\n" ); |
154 | | - $this->mStack[] = array( $message, 0, '0 0', 0, '0 0', 0 ); |
| 154 | + $this->mStack[] = array( $message, 0, 0.0, 0, 0.0, 0 ); |
155 | 155 | } |
156 | 156 | elseif( $bit[0] != $functionname ){ |
157 | 157 | $message = "Profiling error: in({$bit[0]}), out($functionname)"; |
158 | 158 | $this->debug( "$message\n" ); |
159 | | - $this->mStack[] = array( $message, 0, '0 0', 0, '0 0', 0 ); |
| 159 | + $this->mStack[] = array( $message, 0, 0.0, 0, 0.0, 0 ); |
160 | 160 | } |
161 | 161 | //} |
162 | 162 | $bit[] = $time; |
— | — | @@ -265,13 +265,13 @@ |
266 | 266 | if ( $this->mTimeMetric === 'user' ) { |
267 | 267 | return $this->getUserTime(); |
268 | 268 | } else { |
269 | | - return microtime(true); |
| 269 | + return microtime( true ); |
270 | 270 | } |
271 | 271 | } |
272 | 272 | |
273 | 273 | function getUserTime() { |
274 | 274 | $ru = getrusage(); |
275 | | - return $ru['ru_utime.tv_sec'].' '.$ru['ru_utime.tv_usec'] / 1e6; |
| 275 | + return $ru['ru_utime.tv_sec'] + $ru['ru_utime.tv_usec'] / 1e6; |
276 | 276 | } |
277 | 277 | |
278 | 278 | protected function collateData() { |