We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 49c841e + 74c2d1e commit 41d175cCopy full SHA for 41d175c
docs/en/index.rst
@@ -316,3 +316,20 @@ Helper Functions
316
317
* ``sql()`` Dumps out the SQL from an ORM query.
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,
324
+such as portions of a controller action, service logic or view rendering::
325
326
+ use DebugKit\DebugTimer;
327
328
+ public function view($id)
329
+ {
330
+ DebugTimer::start('load_article', 'Fetching article from database');
331
+ // Code to measure the execution time for
332
+ DebugTimer::stop('load_article');
333
+ }
334
335
+When that request finishes, the Timer panel will include the custom timers.
0 commit comments