Fix profiling of benchmarked names like 'something_endpoint_end'
diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php
index 810a025..197dab7 100644
--- a/system/libraries/Profiler.php
+++ b/system/libraries/Profiler.php
@@ -153,7 +153,7 @@
{
// 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 (preg_match('/(.+?)_end$/i', $key, $match)
&& isset($this->CI->benchmark->marker[$match[1].'_end'], $this->CI->benchmark->marker[$match[1].'_start']))
{
$profile[$match[1]] = $this->CI->benchmark->elapsed_time($match[1].'_start', $key);