arrayiterator/profiler
Composer 安装命令:
composer require arrayiterator/profiler
包简介
Record & profiling the code
README 文档
README
INSTALLATION
composer require arrayiterator/profiler
PROFILING
use ArrayIterator\Profiler\Profiler; $profiler = new Profiler(); // start the profiler $performance = $profiler->start('benchmark', 'Group Name', ['data' => 'information']); try { // do something with the code // write the code that you want to benchmark } finally { // best practice to stop the profiler using try -> finally // using finally to make sure the profiler is stopped $performance->stop(['additional' => 'information']); // or using profiler object // the group name is important when you have different group of benchmark // the group: default, as default group // the name of benchmark also important to identify the benchmark $profiler->stop('benchmark', 'Group Name', ['additional' => 'information']); }
RENDERING TOOLBAR
/** * @var \ArrayIterator\Profiler\Profiler $profiler */ $waterfall = $profiler->getWaterfall(); // render the toolbar $darkMode = null; // set true if default dark mode or let it null when using autodetect $content = $waterfall->renderJs($darkMode); // can be echo or append to stream // echo $content; // append to stream interface (PSR-7) // $response->getBody()->write($content);
PREVIEW
ATTENTION
This package still under development, the profiler is ready but the UI is not yet ready. The UI is still under development.
But the profiler is ready to use, you can use it by installing the package and use the profiler. You can customize the implementation of the Frontend or Backend.
UI & IMPLEMENTATION OF RENDERER
Typescript & scss [assets] is used to create the UI, the UI is created using the following technologies:
Maximum record size is 5000 records, if more than 5000 records, the UI will not render the benchmark. (maximum record size can be changed in the preferences). When the record less than 5000 and set less than record, can be reset with:
window.arrayiterator_waterfall.set_max_records(5000);
REQUIREMENT:
- PHP 7.4 or later
- Composer
- DEV (Node.js (npm) - for installing the dependencies)
TASKS
BACKEND
- Benchmark Profiler
- Memory Profiler
- Time Profiler
- Render Profiler
- Code Styling & PhpStan
FRONTEND
- ToolBar (Chrome Like)
- Dark Mode & Light Mode (Auto Detect)
- Resizeable
- Responsiveness
- Action Size
- Maximize
- Minimize (restore)
- Close
- Benchmark Tab
- Filtering
- Waterfall Profiling
- Importer
- Exporter
- Restorer
- Message (information about the import, export, restore)
- Input Search
- Horizontal Resizable Section
- Labs Tab (Under Development)
- Profiler Information
- Metadata of JSON
- RAM Usage & Limit (chart using pie chart from highchart.js)
- Additional Information
- Chart for benchmark
- Source Tab
Benchmark Tab
- Filtering
- Importer
- Exporter
- Restorer
- Message (information about the import, export, restore)
- General Filter
- Performance Filter (Slow, Fast, Average)
- Search Filter (Follow the benchmark content)
- Aggregator Filter (Follow the benchmark aggregation)
- Waterfall Profiling
- Using waterfall using div percentage
- Add additional information for certain table
- Clickable to show the detail of the benchmark
Labs Tab
- Profiler Information
- Metadata of JSON
- RAM Usage & Limit (chart using pie chart from highchart.js)
- Additional Information
- Chart for benchmark
Source Tab
- Code Section
- Prettify/Minify the source code
- Download the source code
- Import the source code
DEPENDENCIES
- Template Engine using SquirrellyJS
- Chart using HighChart
- Icon & SVG using HeroIcons
- Compiled JS using Webpack & TypeScript
- Compiled CSS using Sass
NOTE
Rendering benchmark & source code using looping og setTimeout to make sure the rendering is not blocking the main thread.
LICENSE
arrayiterator/profiler 适用场景与选型建议
arrayiterator/profiler 是一款 基于 TypeScript 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 1, 最近一次更新时间为 2024 年 09 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「profiler」 「benchmark」 「record」 「php profiler」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 arrayiterator/profiler 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 arrayiterator/profiler 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 arrayiterator/profiler 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
g4 application profiler package
Propel2 is an open-source Object-Relational Mapping (ORM) for PHP 5.5 and up.
PHP Interface for Babel Street Text Analytics
Laravel tool benchmark
Benchmark plugin for the Testo testing framework.
Anax Database Active Record module for model classes.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 20
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-09-26

