@@ 157-168 (lines=12) @@ | ||
154 | $profile = array(); |
|
155 | $output = array(); |
|
156 | ||
157 | foreach ($this->CI->benchmark->marker as $key => $val) |
|
158 | { |
|
159 | // We match the "end" marker so that the list ends |
|
160 | // up in the order that it was defined |
|
161 | if (preg_match("/(.+?)_end/i", $key, $match)) |
|
162 | { |
|
163 | if (isset($this->CI->benchmark->marker[$match[1].'_end']) AND isset($this->CI->benchmark->marker[$match[1].'_start'])) |
|
164 | { |
|
165 | $profile[$match[1]] = $this->CI->benchmark->elapsed_time($match[1].'_start', $key); |
|
166 | } |
|
167 | } |
|
168 | } |
|
169 | ||
170 | // Build a table containing the profile data. |
|
171 | // Note: At some point we might want to make this data available to be logged. |
@@ 158-167 (lines=10) @@ | ||
155 | protected function _compile_benchmarks() |
|
156 | { |
|
157 | $profile = array(); |
|
158 | foreach ($this->CI->benchmark->marker as $key => $val) |
|
159 | { |
|
160 | // We match the "end" marker so that the list ends |
|
161 | // up in the order that it was defined |
|
162 | if (preg_match('/(.+?)_end$/i', $key, $match) |
|
163 | && isset($this->CI->benchmark->marker[$match[1].'_end'], $this->CI->benchmark->marker[$match[1].'_start'])) |
|
164 | { |
|
165 | $profile[$match[1]] = $this->CI->benchmark->elapsed_time($match[1].'_start', $key); |
|
166 | } |
|
167 | } |
|
168 | ||
169 | // Build a table containing the profile data. |
|
170 | // Note: At some point we should turn this into a template that can |