Check Your Website Particular Section Execution Time In codeigniter
CodeIgniter has a Benchmarking class that is always active, enabling the time difference between any two marked points to be calculated.
$this->benchmark->mark('code_start');
// Some code happens here
$this->benchmark->mark('code_end');
echo $this->benchmark->elapsed_time('code_start', 'code_end');
For reference please use thebelow link
https://ellislab.com/codeigniter/user-guide/libraries/benchmark.html
For using the Benchmark Class you have to :
- Mark a start point
- Mark an end point
- Run the "elapsed time" function to view the results
Here's the example of the code
$this->benchmark->mark('code_start');
// Some code happens here
$this->benchmark->mark('code_end');
echo $this->benchmark->elapsed_time('code_start', 'code_end');
For reference please use thebelow link
https://ellislab.com/codeigniter/user-guide/libraries/benchmark.html
Comments
Post a Comment