ascetic-soft/rowcast-profiler
最新稳定版本:1.0.0
Composer 安装命令:
composer require ascetic-soft/rowcast-profiler
包简介
SQL query profiler for Rowcast via ConnectionInterface decoration
README 文档
README
Lightweight SQL profiler for Rowcast: wraps AsceticSoft\Rowcast\ConnectionInterface to record timings, parameters (sanitized), errors, and simple aggregates.
Install
composer require ascetic-soft/rowcast-profiler
Usage
use AsceticSoft\Rowcast\Connection; use AsceticSoft\RowcastProfiler\ConnectionProfiler; use AsceticSoft\RowcastProfiler\InMemoryQueryProfileStore; use AsceticSoft\RowcastProfiler\DefaultParameterSanitizer; use AsceticSoft\RowcastProfiler\RowcastProfiler; $inner = Connection::create('sqlite::memory:'); $store = new InMemoryQueryProfileStore(); $sanitizer = new DefaultParameterSanitizer(); $profiler = new RowcastProfiler($store, $sanitizer, slowQueryThresholdMs: 50.0, maxQueries: 500); $connection = new ConnectionProfiler($inner, $profiler); $connection->fetchOne('SELECT 1'); foreach ($store->getProfiles() as $profile) { echo $profile->sql, ' ', $profile->durationMs, "ms\n"; }
Symfony: enable rowcast.profiler in RowcastBundle (see bundle docs).
Packagist / versioning
The root composer.json may include a "version": "1.0.0" field so path repositories and CI resolve a stable ^1.0 constraint. Remove that field when tagging releases on GitHub/Packagist (tags define the version).
License
MIT
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 9
- 依赖项目数: 1
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2026-04-26