clarkeash/laravel-http-stats is a Laravel package for get access to stats for your http requests.
It currently has 7 GitHub stars and 6 downloads on Packagist (latest version v2.0.0).
Install it with composer require clarkeash/laravel-http-stats.
Discover more Laravel packages by clarkeash
or browse all Laravel packages to compare alternatives.
Last updated
Laravel Http Stats gives you access to the transfer stats of HTTP stats performed through Laravels HTTP Client.
You can pull in the package using composer:
$ composer require clarkeash/laravel-http-stats
Once you have made a request like so:
use Illuminate\Support\Facades\Http;
$response = Http::get('http://test.com');
You will now have access to a stats method on the $response object.
$response->stats()->lookup(); // dns time in ms
$response->stats()->connect(); // tcp connection time in ms
$response->stats()->ssl(); // ssl handshake time in ms
$response->stats()->pretransfer(); // Protocol negotiation time in ms
$response->stats()->redirect(); // redirect time in ms
$response->stats()->ttfb(); // time to first byte in ms
$response->stats()->total(); // total time in ms