sohelrana820/php-benchmark 问题修复 & 功能扩展

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

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

sohelrana820/php-benchmark

Composer 安装命令:

composer require sohelrana820/php-benchmark

包简介

Micro library for PHP benchmark

README 文档

README

php-benchmark is a micro library for PHP benchmark

Installation

Manually

Download this library and then require src/Benchmark.php in your project.

Composer

composer require sohelrana820/php-benchmark

Usage

<?php

require 'vendor/autoload.php';

$benchmark = new \SohelRana820\Benchmark\Benchmark();
$benchmark->start();
for ($counter = 0; $counter < 100000; $counter++) {
    // Write some code to execute
}
$benchmark->end();

echo $benchmark->getTime(); // 10ms
echo $benchmark->getTime(true); // 0.010242

echo $benchmark->getMemoryUsage(); // 2.00Mb
echo $benchmark->getMemoryUsage(true); // 2097152 bit
echo $benchmark->getMemoryUsage(false, '%.3f%s'); // 2.000Mb

echo $benchmark->getPeakMemory(); // 2.00Mb
echo $benchmark->getPeakMemory(true); // 2097152 b
echo $benchmark->getPeakMemory(false, '%.3f%s'); // 2.000Mb

License

php-benchmark is licensed under the MIT License

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-03-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固