Skip to content

Commit 6ffd199

Browse files
Documenting the __root__ section
Finally closes the (already closed) #13987 The info is taken from @stof at symfony/symfony#37630 (comment)
1 parent 9e30c28 commit 6ffd199

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

performance.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,15 @@ Sections are a way to split the profile timeline into groups. Example::
327327
$this->stopwatch->start('processing-file');
328328
$this->stopwatch->stopSection('parsing');
329329

330+
All events that don't belong to any named section are added to the special section
331+
``__root__``. This way you can get all stopwatch events, even if you don't know
332+
their names::
333+
334+
foreach($this->stopwatch->getSectionEvents('__root__') as $event) {
335+
echo (string) $event;
336+
}
337+
338+
330339
Learn more
331340
----------
332341

0 commit comments

Comments
 (0)