examples/ratelimit/ratelimit.php
public function getRateByInterval($subject, $interval) {
		$bucket = $this->_getBucketName();
		$count = (int) floor($interval / $this->bucketInterval);
		$transaction = $this->_getTransaction();
		$this->_setMulitExecGetCountPart($transaction, $subject, $bucket, $count);
		return array_sum($transaction->execute());
	}
public function getRateByInterval($subject, $interval) {
		$bucket = $this->_getBucketName();
		$count = (int) floor($interval / $this->bucketInterval);
		$transaction = $this->_getTransaction();
		$this->_setMulitExecGetCountPart($transaction, $subject, $bucket, $count);
		return array_sum($transaction->execute());
	}
Count the number of times the subject has performed an action in the last `$interval` seconds.

@param string $subject A unique identifier, for example a session id or an IP
@param int $interval Interval in seconds
@return int