承接 jenner/timer 相关项目开发

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

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

jenner/timer

Composer 安装命令:

composer require jenner/timer

包简介

php timer. performance analysis tool

README 文档

README

php runtime status report tool

Import

composer require jenner/timer

Or

require /path/to/php-time/src/Time.php

What it can do?

require dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';

// init, set the memory size unit
$timer = new \Jenner\Timer(\Jenner\Timer::UNIT_KB);
// mark a
$timer->mark('a');
sleep(2);
// mark b
$timer->mark('b');
sleep(3);
// mark c
$timer->mark('c');
sleep(4);
// mark d
$timer->mark('d');
// print total report
$timer->printReport();
// get total report
$report = $timer->getReport();
// get the report of mark
$a_report = $timer->getReport('a');
print_r($a_report);
// get the diff report between a and b
$timer->printDiffReportByStartAndEnd('a', 'b');
// get the diff report between a and b
$ab_diff_report = $timer->getDiffReportByStartAndEnd('a', 'b');
// print the total diff report
$timer->printDiffReport();
// get the total diff report
$diff_report = $timer->getDiffReport();
// write the total report into the log file
$timer->logReport('/tmp/php-time.log1');
// write the diff report into the log file
$timer->logDiffReport('/tmp/php-time.log2');
// write the diff report between a and b into the log file
$timer->logDiffReportByStartAndEnd('/tmp/php-time.log3', 'a', 'b');

result:

------------------------------------------
mark:a
time:1437535424.9998s
memory_real:1280KB
memory_emalloc:833.046875KB
memory_peak_real:1280KB
memory_peak_emalloc:843.2890625KB
------------------------------------------
mark:b
time:1437535427s
memory_real:1280KB
memory_emalloc:834.2265625KB
memory_peak_real:1280KB
memory_peak_emalloc:843.2890625KB
------------------------------------------
mark:c
time:1437535430.0002s
memory_real:1280KB
memory_emalloc:835.1875KB
memory_peak_real:1280KB
memory_peak_emalloc:843.2890625KB
------------------------------------------
mark:d
time:1437535434.0004s
memory_real:1280KB
memory_emalloc:836.1484375KB
memory_peak_real:1280KB
memory_peak_emalloc:843.2890625KB
Array
(
    [time] => 1437535424.9998
    [memory_real] => 1310720
    [memory_emalloc] => 853040
    [memory_peak_real] => 1310720
    [memory_peak_emalloc] => 863528
)
------------------------------------------
mark:[diff] start_mark:a end_mark:b
time:2.0001850128174s
memory_real:0KB
memory_emalloc:1.1796875KB
memory_peak_real:0KB
memory_peak_emalloc:0KB
------------------------------------------
mark:[total diff]
time:9.0006000995636s
memory_real:0KB
memory_emalloc:3.1015625KB
memory_peak_real:0KB
memory_peak_emalloc:0KB

jenner/timer 适用场景与选型建议

jenner/timer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 178.7k 次下载、GitHub Stars 达 16, 最近一次更新时间为 2015 年 07 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「memory」 「php timer」 「memory used」 「performance analysis tool」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 jenner/timer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 jenner/timer 我们能提供哪些服务?
定制开发 / 二次开发

基于 jenner/timer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 16
  • Watchers: 3
  • Forks: 9
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-07-22