aaronheath/laravel-speed-test 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

aaronheath/laravel-speed-test

最新稳定版本:v1.1.1

Composer 安装命令:

composer require aaronheath/laravel-speed-test

包简介

Perform scheduled tests to verify downstream bandwidth.

README 文档

README

Build Status

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

统计信息

  • 总下载量: 73
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-09-30