`

php benchmark 脚本

    博客分类:
  • php
阅读更多

<?php
$iterations = 12;
$starttime = explode(' ', microtime());
$string1 = 'abcdefghij';
for($j=1;$j<=$iterations;$j++)
{
        for($i = 1; $i <= 20000; $i++)
        {
                $x=$i * 5;
                $x=$x + $x;
                $x=$x/10;
                $string3 = $string1 . strrev($string1);
                $string2 = substr($string1, 9, 1) . substr($string1, 0, 9);
                $string1 = $string2;
        }
}

$endtime = explode(' ', microtime());
$total_time = $endtime[0] + $endtime[1] - ($starttime[1] + $starttime[0]);
$total_time = round($total_time * 1000);
?>
<html><head>
<title>Free PHP Benchmark Performance Script </title>
<meta content="text/html; charset=windows-1252" http-equiv=content-type />
<meta http-equiv="Content-Style-Type" content="text/css" />
</head>
<body>
<h1>Free PHP Benchmark Performance Script</h1>
<?php
echo "<br/>time: $total_time ms <br/>\n";
?><br>
</body></html>

分享到:
评论

相关推荐

    PHP程序加速探索之脚本执行速度测试

    只有找到影响速度的代码,我们才有可能...PEAR的benchmark包中的Benchmark_Timer类和Benchmark_Iterate类,可以用来很方便地测试脚本执行的速度。(关于PEAR的安装与配置请自行查看相关资料) 。本文将为大家做简单介绍。

    php-gc-benchmark:对 PHP GC 检测的不同方法进行基准测试

    php-gc-基准测试对 PHP GC 检测的不同方法进行基准测试。内容bin : Docker 容器的... 你可以这样构建它: docker build -t gc-benchmark .# Wait a while.docker run --rm gc-benchmark当然,您也可以手动运行测试。

    benchmark:适用于PHP,MySQL,ImageMagick等的基准脚本

    PHP,MySQL和图形基准 安装 composer require wapplersystems/benchmark 将config / db.config.php.example复制到config / db.config.php并编辑连接设置。

    Benchmark_Geek:基准_怪胎

    从PHP开始Benchmark.php提供了有关PHP Constant v / s的速度和内存使用情况的想法。 多变的在这里,Microtime()显示执行所需的时间,并为该函数分配的内存显示_get _usage()。 该演示功能正在执行两次100k次处理...

    检测codeigniter脚本消耗内存情况的方法

    php echo $this-&gt;benchmark- &gt;memory_usage() ; ?&gt; 相关的伪变量是: { memory_usage} 希望本文所述对大家基于codeigniter的php程序设计有所帮助。 您可能感兴趣的文章:php实现仿写CodeIgniter的购物车类...

    codeigniter显示所有脚本执行时间的方法

    php echo $this-&gt;benchmark- &gt;elapsed_time() ; ?&gt; 也可以使用下面的伪变量 { elapsed_time} 希望本文所述对大家基于codeigniter的php程序设计有所帮助。 您可能感兴趣的文章:php实现仿写CodeIgniter的购物车...

    uuid-benchmark:ramseyuuid的基准测试

    php.net/get/uuid-1.0.4.tgz && tar zxf uuid-1.0.4.tgz && cd uuid-1.0.4/phpize && ./configure && make && make installphpbrew config # Add the line "extension=uuid.so" to the config and save现在获取基准...

    hawki-cloud-benchmark:HPC 云中的基准科学应用程序

    环境:python 中的管理器脚本,用于接受输入参数(来自 portlet 或控制台)并在创建具有指定配置的集群后运行基准测试。 基准:要在集群中执行的基准/程序库。 您可以通过门户上传自己的程序。 典型执行中的简单...

    Zend \ Cache一个通用PHP缓存系统-PHP开发

    zend-cache Zend \ Cache为PHP提供了一个通用的缓存系统。 Zend \ Cache组件能够使用不同的存储适配器(DB,...我们提供使用PHPBench框架对zend-cache进行基准测试的脚本。 这些可以在Benchmark /目录中找到。 执行be

    couchdb-benchmarks:一些用于测试CouchDB性能的基准脚本

    重要的 您可能想忽略自己的理性思维,转而关注我发表的结果,并将这些价值观视为真理。 不要。 或者至少不要因为任何架构上的结果而怪我。 我目前正在这些基准测试上,以获取有关CouchDB扩展属性的第一手数据。...

    JShielder:适用于Linux服务器的强化脚本安全的LAMP-LEMP Deployer CIS基准测试

    适用于Linux服务器的JShielder自动强化脚本 JSHielder是一个开放源代码的Bash脚本,旨在帮助SysAdmin和开发人员保护将在其中部署任何Web应用程序或服务Linux服务器。 该工具可自动完成安装所有必需软件包的过程,以...

    laminas-stdlib:SPL扩展,数组实用程序,错误处理程序等

    laminas-stdlib Laminas\Stdlib是...我们提供了使用框架对 -stdlib进行基准测试的脚本; 这些可以在benchmark/目录中找到。 要执行基准测试,可以运行以下命令: $ vendor/bin/phpbench run --report=aggregate

    jquery插件使用方法大全

    推荐 微软的visual studio 2008 sp1支持对jquery的动态提示,只要在代码页导入对应的vsdoc脚本就可以。 目前为止,jQuery的最新版本为1.7.2。 编辑本段历史版本  jQuery 1.0(2006年8月):该库的第一个稳定版本,...

Global site tag (gtag.js) - Google Analytics