chocofamilyme / laravel-pinba
将 pinba 与 Laravel 集成
4.0.0
2023-03-07 07:30 UTC
Requires
- php: ^8.0.2
- illuminate/http: ^8.0|^9.0|^10.0
- illuminate/log: ^8.0|^9.0|^10.0
- illuminate/queue: ^8.0|^9.0|^10.0
- illuminate/routing: ^8.0|^9.0|^10.0
Requires (Dev)
- squizlabs/php_codesniffer: ^3.5
- vimeo/psalm: ^4.3
This package is auto-updated.
Last update: 2024-09-02 05:49:49 UTC
README
Laravel pinba 中间件和计时器集成
描述
安装
composer require chocofamilyme/laravel-pinba
发布配置(可选)
php artisan vendor:publish --provider="Chocofamilyme\LaravelPinba\Providers\PinbaServiceProvider"
配置
Pinba
Pinba 配置文件位于 config/pinba.php 下
使用
为库提供了一个名为 "Pinba" 的 Facade
启动计时器
$timerId = Pinba::startTimer(string $group, string $type, string $method, string $category);
停止计时器
Pinba::stopTimer($timerId)
停止所有计时器
Pinba::stopAllTimers();
更多方法
请查看 "Chocofamilyme\LaravelPinba\Profiler\PinbaDestination" 类
目的地
Pinba
此库将数据发送到 pinba 服务器
文件
此库将数据发送到日志文件
空
数据不会被发送