improve name
This commit is contained in:
parent
61fe3621be
commit
95e519e499
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue