From d13ff07599e9ff114051f4823c4c0d13fd1c814d Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 3 Oct 2006 03:40:45 +0000 Subject: --- system/libraries/Profiler.php | 72 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 system/libraries/Profiler.php (limited to 'system/libraries/Profiler.php') diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php new file mode 100644 index 000000000..026bfac60 --- /dev/null +++ b/system/libraries/Profiler.php @@ -0,0 +1,72 @@ +benchmark->marker as $key => $val) + { + // We match the "end" marker so that the list ends + // up in the order that it was defined + if (preg_match("/(.+?)_end/i", $key, $match)) + { + if (isset($obj->benchmark->marker[$match[1].'_end'])) + { + $times[$match[1]] = $obj->benchmark->elapsed_time($match[1].'_start', $key); + } + } + } + + return $times; + } + + // -------------------------------------------------------------------- + +} + +// END CI_Profiler class +?> \ No newline at end of file -- cgit v1.2.3-24-g4f1b