sapiet/profiler 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

sapiet/profiler

Composer 安装命令:

composer require sapiet/profiler

包简介

PHP duration & memory usage profiler

README 文档

README

Installation

composer req sapiet/profiler

Usage

require_once __DIR__.'/vendor/autoload.php';

use Sapiet\Profiler\Profiler;

$number = 50000000;

// Starts a test named 'test-1'
Profiler::start('test-1');
foreach (range(1, $number) as $value) {
    // echo $value;
}
// Ends the test named 'test-1'
$test1 = Profiler::end('test-1');

// Starts a test named 'test-2'
Profiler::start('test-2');
function xrange($min, $max) {
    for ($i = $min; $i < $max; $i++) yield $i;
}

foreach (xrange(1, $number) as $value) {
    // echo $value;
}
// Ends the test named 'test-2'
$test2 = Profiler::end('test-2');

// Displaying test results
echo $test1->format();
echo PHP_EOL;
echo $test2->format();

Output:

1.276 sec / 376 oct
2.318 sec / 0 oct

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-09-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固