Returns the rate with formatting.

def str_rate(self):
        """Returns the rate with formatting."""
        # Handle special cases.
        if not self._eta.started or self._eta.stalled or not self.rate:
            return '--- KiB/s'

        unit_rate, unit = UnitByte(self.rate).auto_no_thousands
        if unit_rate >= 10:
            formatter = '%d'
        else:
            formatter = '%0.1f'
        return '{0} {1}/s'.format(locale.format(formatter, unit_rate, grouping=False), unit)