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
@@ -316,3 +316,19 @@ Helper Functions
316
316
317
317
* ``sql()`` Dumps out the SQL from an ORM query.
318
318
* ``sqld()`` Dumps out the SQL from an ORM query, and exits.
319
+
320
+
Using DebugTimer
321
+
----------------
322
+
323
+
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::
324
+
325
+
use DebugKit\DebugTimer;
326
+
327
+
public function view($id)
328
+
{
329
+
DebugTimer::start('load_article', 'Fetching article from database');
330
+
...
331
+
DebugTimer::stop('load_article');
332
+
}
333
+
334
+
When that request finishes, the Timer panel will include the custom timers.
0 commit comments