File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -323,6 +323,23 @@ Helper Functions
323323* ``sql() `` Dumps out the SQL from an ORM query.
324324* ``sqld() `` Dumps out the SQL from an ORM query, and exits.
325325
326+ Using DebugTimer
327+ ----------------
328+
329+ Use the `DebugTimer ` to measure parts of the code that are not captured by the default timers,
330+ such as portions of a controller action, service logic or view rendering::
331+
332+ use DebugKit\DebugTimer;
333+
334+ public function view($id)
335+ {
336+ DebugTimer::start('load_article', 'Fetching article from database');
337+ // Code to measure the execution time for
338+ DebugTimer::stop('load_article');
339+ }
340+
341+ When that request finishes, the Timer panel will include the custom timers.
342+
326343Tracing query execution
327344=======================
328345
You can’t perform that action at this time.
0 commit comments