承接 mtolhuys/laravel-request-benchmark 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

mtolhuys/laravel-request-benchmark

Composer 安装命令:

composer require mtolhuys/laravel-request-benchmark

包简介

Configurable middleware measuring your request's time and memory usage

README 文档

README

Latest Version on Packagist Build Status Quality Score Total Downloads

This package comes with a benchmark middleware which, if included, will measure your requests time and memory usage.

Installation

You can install the package via composer:

composer require mtolhuys/laravel-request-benchmark

Usage

Add the 'benchmark' middleware to the routes you want to measure f.e.:

Route::group(['middleware' => ['foo', 'bar', 'benchmark']], function() {  
    // benchmarked routes  
});

// Or

Route::get('/', 'IndexController@index')->middleware('benchmark');

Out of the box this will create debug log entries f.e.:

[yyyy-mm-dd hh:mm:ss] local.DEBUG: request-benchmark: GET[http://localhost]
Time: 1.05ms
Pre memory usage 3169Kb
Post memory usage 3296Kb (127Kb)  

As well as a overview page on route /request-benchmark containing a table showing the results stored in request-benchmark.json file.

This behavior is configurable with the included request-benchmark config file. Run php artisan vendor:publish --provider="Mtolhuys\LaravelRequestBenchmark\LaravelRequestBenchmarkServiceProvider" if you don't see it in your config/ folder.

return [
    'enabled' => true, // set to false to globally stop benchmark
    'log' => true, // set to false to stop creating log entries
    'storage_path' => null, // if specified it will create a request-benchmark.json containing all data
];

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email mtolhuys@hotmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-08-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固