知识屋:更实用的电脑技术知识网站
所在位置:首页 > 编程技术  > PHP编程

php pear Benchmark

发表时间:2015-05-27来源:网络

Benchmark

基本信息

Version: 1.2.9

Release date: 2011-12-11 13:02 UTC

Description: 测试php脚本性能的框架(Framework to benchmark PHP scripts or function calls. )
Download: Benchmark pear

安装与配置

下载文件后解压文件目录结构如下

/


运行timer_example.php显示效果图如下

/

功能使用

Timer.php

主要函数:

$timer->start() 开始标记 相当于 $timer->setMarker("start')

$timer->setMarker('mark'); 标记 返回页面时此处标记到上一个标记之间的 时间、百分比$timer->stop() 结束标记 相当于 $timer->setMarker('stop')
$timer->display(); 输出到页面

测试 is_file与file_exists性能对比
start();for ($index = 0; $index setMarker('is_file');for ($index = 0; $index setMarker('file_exists');$timer->stop();$timer->display();

/


收藏
  • 人气文章
  • 最新文章
  • 下载排行榜
  • 热门排行榜