You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/index.rst
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -323,6 +323,22 @@ Helper Functions
323
323
* ``sql()`` Dumps out the SQL from an ORM query.
324
324
* ``sqld()`` Dumps out the SQL from an ORM query, and exits.
325
325
326
+
Using DebugTimer
327
+
----------------
328
+
329
+
Use the DebugTimer to measure parts of the code that are not captured by the default timers, such as portions of a controller action, service logic or view rendering::
330
+
331
+
use DebugKit\DebugTimer;
332
+
333
+
public function view($id)
334
+
{
335
+
DebugTimer::start('load_article', 'Fetching article from database');
336
+
...
337
+
DebugTimer::stop('load_article');
338
+
}
339
+
340
+
When that request finishes, the Timer panel will include the custom timers.
0 commit comments