承接 pmg/queue-profiling 相关项目开发

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

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

pmg/queue-profiling

Composer 安装命令:

composer require pmg/queue-profiling

包简介

Profile running queues with various libraries and SaaS products.

README 文档

README

Provides a ProfilingConsumer and set of handler decorators that can profile messages once or while the queue is running via SIGUSR1 (or other) posix signals.

Usage

Pick an appropriate handler for your setup.

  • PMG\Queue\Handler\BlackfireProfilingHandler - Profile with blackfire.io

All profiling handlers are decorators, so you'll create a real message handler and decorate it with the profiling handler.

use PMG\Queue\Message;
use PMG\Queue\ProfilingConsumer;
use PMG\Queue\Handler\CallableHandler;
use PMG\Queue\Handler\BlackfireProfilingHandler;

$realHandler = new CallableHandler(function (Message $message) {
    // do stuff
});

$profilingHandler = BlackfireProfilingHandler::createDefault($realHandler);

If you plan on forking new processes to handle messages with PcntlForkingHandler, decorate the profiling handler with it.

use PMG\Queue\Handler\PcntlForkingHandler;

$forkingHandler = new PcntlForkingHandler($profilingHandler);

Instantiate a Consumer Like Normal

use PMG\Queue\ProfilingConsumer

$consumer = new ProfilingConsumer($driver, $profilingHandler);

Enable or Disable Profiling or Let the Signal Handlers Take Care of It

// let the signal handler do their thing(s)
$consumer->run('SomeQueue');

// or enable/disable profiling manually
$consumer->enableProfiling();
$consumer->once('SomeQueue');

$consumer->disableProfiling();
$consumer->once('SomeQueue');

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2016-08-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固