improve name

This commit is contained in:
freek 2018-12-03 14:24:54 +01:00
parent 61fe3621be
commit 95e519e499
2 changed files with 5 additions and 5 deletions

View File

@ -55,10 +55,10 @@ class Statistic
$this->apiMessageCount++; $this->apiMessageCount++;
} }
public function reset(int $connections) public function reset(int $currentConnectionCount)
{ {
$this->connections = $connections; $this->connections = $currentConnectionCount;
$this->peakConnections = $connections; $this->peakConnections = $currentConnectionCount;
$this->webSocketMessageCount = 0; $this->webSocketMessageCount = 0;
$this->apiMessageCount = 0; $this->apiMessageCount = 0;
} }

View File

@ -71,12 +71,12 @@ class StatisticsLogger
); );
// Reset connection and message count // Reset connection and message count
$connections = collect($this->channelManager->getChannels($appId)) $currentConnectionCount = collect($this->channelManager->getChannels($appId))
->sum(function ($channel) { ->sum(function ($channel) {
return count($channel->getSubscribedConnections()); return count($channel->getSubscribedConnections());
}); });
$statistic->reset($connections); $statistic->reset($currentConnectionCount);
} }
} }
} }