improve name
This commit is contained in:
parent
61fe3621be
commit
95e519e499
|
|
@ -55,10 +55,10 @@ class Statistic
|
|||
$this->apiMessageCount++;
|
||||
}
|
||||
|
||||
public function reset(int $connections)
|
||||
public function reset(int $currentConnectionCount)
|
||||
{
|
||||
$this->connections = $connections;
|
||||
$this->peakConnections = $connections;
|
||||
$this->connections = $currentConnectionCount;
|
||||
$this->peakConnections = $currentConnectionCount;
|
||||
$this->webSocketMessageCount = 0;
|
||||
$this->apiMessageCount = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,12 +71,12 @@ class StatisticsLogger
|
|||
);
|
||||
|
||||
// Reset connection and message count
|
||||
$connections = collect($this->channelManager->getChannels($appId))
|
||||
$currentConnectionCount = collect($this->channelManager->getChannels($appId))
|
||||
->sum(function ($channel) {
|
||||
return count($channel->getSubscribedConnections());
|
||||
});
|
||||
|
||||
$statistic->reset($connections);
|
||||
$statistic->reset($currentConnectionCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue