Setting a benchmark in codeigniter

We can set a benchmark in codeigniter by setting the starting point, setting the ending point and use a function to show the elapsed time.
Example code:

$this->benchmark->mark( ' start' ) ;
// code executes here..
$this->benchmark->mark( ' end' ) ;
echo $this->benchmark->elapsed_time(' start' , ' end' ) ;

The names start and end are arbitrary, and can be anything you choose.

Enjoyed this post? Share it!


Leave a comment

Your email address will not be published.