aaronheath / laravel-speed-test
Perform scheduled tests to verify downstream bandwidth.
Requires
- php: ^8.2.0
- ext-json: *
- aaronheath/class-logger: ^1.2.0
- aaronheath/oauth-client: ^1.0.0
- guzzlehttp/guzzle: ^7.8.0
- illuminate/support: ^10.0.0
Requires (Dev)
- mockery/mockery: ^1.5.0
- orchestra/testbench: ^8.0.0
- phpunit/phpunit: ^10.0.0
- sempro/phpunit-pretty-print: ^1.0
- timacdonald/log-fake: ^2.0.0
- dev-master
- v1.1.1
- v1.1.0
- v1.0.1
- v1.0.0
- v0.0.4
- v0.0.3
- v0.0.2
- v0.0.1
- dev-20240209-switch-to-process
- dev-20250206-docker
- dev-20231001-oauth-bump
- dev-20231001-laravel-10
- dev-dependabot/composer/symfony/http-kernel-4.4.50
- dev-dependabot/composer/guzzlehttp/guzzle-6.5.8
- dev-dependabot/composer/guzzlehttp/psr7-1.8.5
- dev-dependabot/composer/lcobucci/jwt-3.4.6
- dev-dependabot/composer/league/flysystem-1.1.4
- dev-20201923-laravel-5-8-support
This package is auto-updated.
Last update: 2025-03-09 00:11:45 UTC
README
Introduction
This is a personal package to facilitate scheduled downstream bandwidth checks.
Installation
This package is installed via Composer.
Before installing, the repository, along with other private packages, must be added to the repositories section of the host projects composer.json.
"repositories": [
{
"type": "vcs",
"url": "https://github.com/aaronheath/laravel-speed-test"
},
{
"type": "vcs",
"url": "https://github.com/aaronheath/oauth-client"
},
{
"type": "vcs",
"url": "https://github.com/aaronheath/class-logger"
}
],
To install, run the following command.
composer require aaronheath/laravel-speed-test
Then, publish the configuration file. New file will be created at config/bandwidth-check.php.
Another new configuration file maybe created for oauth-client. Please refer to that project for further details.
php artisan vendor:publish
Finally, you'll want to configure the bandwidth checker by updating the projects .env file. Update values as required.
BANDWIDTH_CHECK_ENABLED=true
BANDWIDTH_CHECK_REPORT_URL=https://example.com/api/bandwidth-check
BANDWIDTH_CHECK_RUNNER=docker # or system
Performing Bandwidth Checks
Via CLI
Once properly configured, bandwidth checks can be performed via cli.
php artisan bandwidth-check:run
By executing this command, a check will be performed and results sent to the remote repository.
Via Job
Bandwidth checks can also be dispatched onto the queue via a job.
dispatch(new Heath\BandwidthCheck\BandwidthCheckJob);
Directly
A bandwidth check can also be actioned synchronously.
(new Heath\BandwidthCheck\BandwidthCheck)->run();
BandwidthCheck also includes a handy isEnabled() method to help ensure that checks are enabled.
(new Heath\BandwidthCheck\BandwidthCheck)->isEnabled(); // bool