BandwidthStatsTracker
Methods
__construct()
php
public function __construct(int $historySize)add()
php
public function add(int $bytes) : voidgetAverageBytes()
php
public function getAverageBytes() : floatReturns the average of all the tracked history values.
getTotalBytes()
php
public function getTotalBytes() : intresetHistory()
php
public function resetHistory() : voidrotateHistory()
php
public function rotateHistory() : voidAdds the bytes tracked since the last rotation to the history array, overwriting an old entry. This should be called on a regular interval that you want to collect average measurements over (e.g. if you want bytes per second, call this every second).
