clarkeash / laravel-http-stats
Get access to stats for your http requests
v1.0.0
2020-04-04 20:12 UTC
Requires
- php: ^7.3
- guzzlehttp/guzzle: ^6.5
- laravel/framework: ^7.0
Requires (Dev)
- orchestra/testbench: ^5.1
- phpunit/phpunit: ^9.0
- dev-master
- v1.0.0
- dev-dependabot/composer/guzzlehttp/guzzle-6.5.8
- dev-dependabot/composer/guzzlehttp/guzzle-6.5.7
- dev-dependabot/composer/guzzlehttp/psr7-1.8.5
- dev-dependabot/composer/league/flysystem-1.1.4
- dev-dependabot/composer/laravel/framework-7.30.4
- dev-dependabot/composer/symfony/http-kernel-5.1.5
This package is auto-updated.
Last update: 2022-06-21 18:11:41 UTC
README
Laravel Http Stats gives you access to the transfer stats of HTTP stats performed through Laravels HTTP Client.
Installation
You can pull in the package using composer:
$ composer require clarkeash/laravel-http-stats
Usage
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