/**
* Display the routes rate limiting requests per second. This takes the limit
* and divides it by the expiration time in seconds to give you a rough
* idea of how many requests you'd be able to fire off per second
* on the route.
*
* @param \Dingo\Api\Routing\Route $route
*
* @return null|string
*/
protected function routeRateLimit($route)
{
list($limit, $expires) = [$route->getRateLimit(), $route->getRateLimitExpiration()];
if ($limit && $expires) {
return sprintf('%s req/s', round($limit / ($expires * 60), 2));
}
}