Welcome Guest, Not a member yet? Register   Sign In
end of CI Controller call loop
#1

What is the last thing to run in CI 3 ?

Is the CI 3 loop documented some place?

Also I wanted to have an automated way to log performance like time and resource usage.  I want to be able to associate it to my controller function that was called.  Any recommendations?

Does the CI 3 controller have a destructor or something?
Reply
#2

CodeIgniter 3.1.11 User Guide - Benchmarking Class

CodeIgniter 3.1.11 User Guide - Application Flow Chart

CodeIgniter 3.1.11 User Guide - Design and Architectural Goals
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

(This post was last modified: 03-10-2021, 01:30 PM by Goddard.)

(03-10-2021, 12:12 PM)InsiteFX Wrote: CodeIgniter 3.1.11 User Guide - Benchmarking Class

CodeIgniter 3.1.11 User Guide - Application Flow Chart

CodeIgniter 3.1.11 User Guide - Design and Architectural Goals

Thanks that is helpful.  I knew about the benchmarking class and was planning on using it.  

What I would like to do is have it be logged at the end of every single function call so I can keep track of performance of the application.  I tried going to my MY_Controller inside the __destruct before the parent function is called, but that doesn't work as Session appears to already have been destroyed.

For example in the __destruct it just does this {elapsed_time}, but in the actual benchmark class it looks like it is supposed to return number_format not a view variable.
Reply
#4

My be extend the bench marking class and have it do the logging for you,
just a though.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#5

Yeah that would work nicely, but still how can I have for instance $this->benchmark->elapsed_time(); run at the end of every single function call in a controller?

Is this some kind of PHP structure I am not familiar with?

Thanks
Reply




Theme © iAndrew 2016 - Forum software by © MyBB