Welcome Guest, Not a member yet? Register   Sign In
Benchmark mark - converting from CI3 to CI4
#1

Hello,
I'm converting a large project from CI3 to CI4.  I have the following lines that needs to be converted: 
Code:
$this->benchmark->mark('getProjectMethods_start');
//code in between
$this->benchmark->mark('getProjectMethods_end');

I don't see an equivalent function to 'mark' in the CI4 documentation on benchmarking https://codeigniter4.github.io/CodeIgnit...hmark.html
How would I do this in CI4? Do I just use start and end with the same name, something like: 
Code:
$benchmark = service('timer');
$benchmark->start('getProjectMethods');
//code in between
$benchmark->end('getProjectMethods');
Reply


Messages In This Thread
Benchmark mark - converting from CI3 to CI4 - by xanabobana - 10-01-2024, 12:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB