Skip to content

Commit 638cb19

Browse files
committed
Fix profiler
1 parent 02182bf commit 638cb19

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/DataCollector/MercureDataCollector.php

Lines changed: 6 additions & 3 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());

0 commit comments

Comments
 (0)