bi0r0b0t/silex-pinba-provider
Composer 安装命令:
composer require bi0r0b0t/silex-pinba-provider
包简介
Provide PinbaBundle for Silex
README 文档
README
Provide PinbaBundle functionality for Silex
Installation
For Silex 2.0
composer require bi0r0b0t/silex-pinba-provider
or
Require the bundle in your composer.json file:
{
"require": {
"bi0r0b0t/silex-pinba-provider": "~1.0",
}
}
For Silex 1.0
Through Composer as bi0r0b0t/silex-pinba-provider .
Require the bundle in your composer.json file:
{
"require": {
"bi0r0b0t/silex-pinba-provider": "~0.1",
}
}
Register
Important! Register the bundle in prod environment after TwigServiceProvider and DoctrineServiceProvider:
/** * @var $app Silex\Application */ $app->register(new SilexPinbaProvider\SilexPinbaProvider()
Using with Doctrine ORM
Examples based on dflydev/doctrine-orm-service-provider
Collecting Filesystem metrics
/** * @var $app Silex\Application */ $app['orm.cache.factory.filesystem'] = $app->protect(function($cacheOptions) use ($app) { if (empty($cacheOptions['path'])) { throw new \RuntimeException('FilesystemCache path not defined'); } $cache = new SilexPinbaProvider\Cache\Filesystem($cacheOptions['path']); $cache->setStopwatch($app['intaro_pinba.stopwatch']); return $cache; });
Collecting Memcache metrics
/** * @var $app Silex\Application */ $app['orm.cache.factory.backing_memcache'] = $app->protect(function() use ($app) { $cache = new Intaro\PinbaBundle\Cache\Memcache(); $cache->setStopwatch($app['intaro_pinba.stopwatch']); return $cache; });
Using with console
/** * @var $console Symfony\Component\Console\Application * @var $app Silex\Application */ if (function_exists('pinba_script_name_set')) { pinba_script_name_set('console'); $input = new Symfony\Component\Console\Input\ArgvInput(); $timer = pinba_timer_start(array( 'server' => $app['intaro_pinba.server.name'], 'group' => 'console::run', 'command' => $input->getFirstArgument(), )); $res = $console->run($input); pinba_timer_stop($timer); return $res; } else { return $console->run(); }
bi0r0b0t/silex-pinba-provider 适用场景与选型建议
bi0r0b0t/silex-pinba-provider 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 687 次下载、GitHub Stars 达 0, 最近一次更新时间为 2016 年 03 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「silex」 「php」 「pinba」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 bi0r0b0t/silex-pinba-provider 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bi0r0b0t/silex-pinba-provider 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 bi0r0b0t/silex-pinba-provider 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Collects and sends execution time of Doctrine queries, Twig renders and Redis requests as pinba timers to pinba server
Библиотека для профилирования
Integrates pinba with Laravel
Pinba for Yii2
Object-oriented CRUD for Doctrine DBAL
Pinba extension drop-in replacement
统计信息
- 总下载量: 687
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-03-09