Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
joedixon committed Nov 29, 2023
1 parent ae6e442 commit 89cca0d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Channels/Channel.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,12 @@ public function broadcastToAll(array $payload): void
{
$message = json_encode($payload);

$total = count($this->connections);
$start = microtime(true);
foreach ($this->connections as $connection) {
$connection->send($message);
}
info('Broadcasted to ' . $total . ' connections in ' . (microtime(true) - $start) . ' seconds');
}

/**
Expand Down

0 comments on commit 89cca0d

Please sign in to comment.