Profiling benchmarks in codeigniter

If you want your benchmarks to be available to the Profiler Class then you will need to set your benchmarks up in pairs. These pairs should end with _start and _end, but be otherwise identically named.
Example:

$this->benchmark->mark( ' first_mark_start' ) :
// something happens
$this->benchmark->mark( ' first_mark_end' ) ;
$this->benchmark->mark( ' second_mark_start' ) ;
// something else happens
$this->benchmark->mark( ' second_mark_end' ) ;

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.