def METHOD_NAME(self, amount=1):
    with self._lock:
        t = self._clock.current_time()
        bucket = (
            math.floor(t * self._time_bucket_scale)
            / self._time_bucket_scale
        )
        self._count += amount
        if bucket > self._last_bucket:
            current_rate = self._count / float(bucket - self._last_bucket)
            self._measured_rate = (current_rate * self._smoothing) + (
                self._measured_rate * (1 - self._smoothing)
            )
            self._count = 0
            self._last_bucket = bucket
        return self._measured_rate