Skip to content

Commit 2087828

Browse files
authored
Merge pull request #22 from grachevko/master
Fix Profiler
2 parents 02182bf + 324b894 commit 2087828

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/DataCollector/MercureDataCollector.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,13 @@ public function collect(Request $request, Response $response, \Throwable $except
4040
];
4141

4242
foreach ($this->publishers as $name => $publisher) {
43-
$this->data['publishers'][$name]['messages'] = $publisher->getMessages();
44-
}
43+
$this->data['publishers'][$name] = [
44+
'count' => $publisher->count(),
45+
'duration' => $publisher->getDuration(),
46+
'memory' => $publisher->getMemory(),
47+
'messages' => $publisher->getMessages(),
48+
];
4549

46-
foreach ($this->publishers as $name => $publisher) {
4750
$this->data['duration'] += $publisher->getDuration();
4851
$this->data['memory'] += $publisher->getMemory();
4952
$this->data['count'] += \count($publisher->getMessages());
@@ -75,9 +78,6 @@ public function getMemory(): int
7578
return $this->data['memory'];
7679
}
7780

78-
/**
79-
* @return TraceablePublisher[]
80-
*/
8181
public function getPublishers(): iterable
8282
{
8383
return $this->data['publishers'];

0 commit comments

Comments
 (0)