mamitech/laravel-slow-query-log 问题修复 & 功能扩展

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

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

mamitech/laravel-slow-query-log

最新稳定版本:v3.0

Composer 安装命令:

composer require mamitech/laravel-slow-query-log

包简介

Slow query logging for Laravel

README 文档

README

Usage

Publish config

The first time you use this package, publish the configuration by typing php artisan vendor:publish --provider=Mamitech\SlowQueryLog\ServiceProvider

Enable it by settings environment variable SLOW_QUERY_LOG_ENABLED to true.

Set your minimum threshold of query execution to be considered slow by setting environment variable SLOW_QUERY_MIN_THRESHOLD to a number (in millisecond unit).

If you only want to trace certain files, set your environment variable SLOW_QUERY_TRACE_ONLY to some string. For example if you want to only keep the trace data of all files within app/ folder, set SLOW_QUERY_TRACE_ONLY to app/

Run Test

Before running test, make sure you have installed all the dependencies by running:

composer install

Then, make sure you have php-sqlite3 installed in your system because use sqlite to run the test.

In debian based system:

sudo apt install php-sqlite3

Now run the test using:

./vendor/bin/phpunit

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-04-06