Skip to content

Commit d7bf00a

Browse files
committed
Merge branch '4.4' into 5.4
* 4.4: Documenting the __root__ section
2 parents e68413e + cfdeef3 commit d7bf00a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

performance.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,14 @@ Sections are a way to split the profile timeline into groups. Example::
334334
$this->stopwatch->start('processing-file');
335335
$this->stopwatch->stopSection('parsing');
336336

337+
All events that don't belong to any named section are added to the special section
338+
called ``__root__``. This way you can get all stopwatch events, even if you don't
339+
know their names, as follows::
340+
341+
foreach($this->stopwatch->getSectionEvents('__root__') as $event) {
342+
echo (string) $event;
343+
}
344+
337345
Learn more
338346
----------
339347

0 commit comments

Comments
 (0)