Airship\Engine\Continuum\Channel::getAppropriatePeerSize PHP Method

getAppropriatePeerSize() public method

The natural log of the size of the peer list, rounded up.
public getAppropriatePeerSize ( integer $sizeOfList ) : integer
$sizeOfList integer
return integer
    public function getAppropriatePeerSize(int $sizeOfList = 0) : int
    {
        if ($sizeOfList < 1) {
            $sizeOfList = \count($this->peers);
        }
        $log = (int) \ceil(\log($sizeOfList));
        if ($log < 1) {
            return 1;
        }
        return $log;
    }