本文整理汇总了PHP中end_test函数的典型用法代码示例。如果您正苦于以下问题:PHP end_test函数的具体用法?PHP end_test怎么用?PHP end_test使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了end_test函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: end_test
$x->post_dec_prop(N);
$t = end_test($t, '$this->x--', $overhead);
$x->isset_prop(N);
$t = end_test($t, 'isset($this->x)', $overhead);
$x->empty_prop(N);
$t = end_test($t, 'empty($this->x)', $overhead);
$x->call(N);
$t = end_test($t, '$this->f()', $overhead);
$x->read_const(N);
$t = end_test($t, '$x = Foo::TEST', $overhead);
create_object(N);
$t = end_test($t, 'new Foo()', $overhead);
read_const(N);
$t = end_test($t, '$x = TEST', $overhead);
read_auto_global(N);
$t = end_test($t, '$x = $_GET', $overhead);
read_global_var(N);
$t = end_test($t, '$x = $GLOBALS[\'v\']', $overhead);
read_hash(N);
$t = end_test($t, '$x = $hash[\'v\']', $overhead);
read_str_offset(N);
$t = end_test($t, '$x = $str[0]', $overhead);
issetor(N);
$t = end_test($t, '$x = $a ?: null', $overhead);
issetor2(N);
$t = end_test($t, '$x = $f ?: tmp', $overhead);
ternary(N);
$t = end_test($t, '$x = $f ? $f : $a', $overhead);
ternary2(N);
$t = end_test($t, '$x = $f ? $f : tmp', $overhead);
total($t0, "Total");
开发者ID:cefalo19,项目名称:php-src,代码行数:31,代码来源:micro_bench.php
示例2: end_test
end_test('Repeated send (small array)', 'http 11 w. keep-alive and compression', $response);
$c->keepalive = false;
begin_test('Repeated send (small array)', 'http 11 w. compression');
$response = array();
for ($i = 0; $i < 25; $i++) {
$resp =& $c->send($msg, 10, 'http11');
$response[] = $resp->value();
}
end_test('Repeated send (small array)', 'http 11 w. compression', $response);
}
begin_test('Repeated send (small array)', 'multicall w. compression');
$response =& $c->send($msgs);
foreach ($response as $key => &$val) {
$val = $val->value();
}
end_test('Repeated send (small array)', 'multicall w. compression', $response);
}
}
// end of 'if no xdebug profiling'
function begin_test($test_name, $test_case)
{
global $test_results;
if (!isset($test_results[$test_name])) {
$test_results[$test_name] = array();
}
$test_results[$test_name][$test_case] = array();
$test_results[$test_name][$test_case]['time'] = microtime(true);
}
function end_test($test_name, $test_case, $test_result)
{
global $test_results;
开发者ID:ronaldodia,项目名称:backend_al,代码行数:31,代码来源:benchmark.php
示例3: start_test
}
function start_test()
{
ob_start();
return getmicrotime();
}
function end_test($start, $name)
{
global $total;
$end = getmicrotime();
ob_end_clean();
$total += $end - $start;
$num = number_format($end - $start, 3);
$pad = str_repeat(" ", 24 - strlen($name) - strlen($num));
echo $name . $pad . $num . "\n";
ob_start();
return getmicrotime();
}
function total()
{
global $total;
$pad = str_repeat("-", 24);
echo $pad . "\n";
$num = number_format($total, 3);
$pad = str_repeat(" ", 24 - strlen("Total") - strlen($num));
echo "Total" . $pad . $num . "\n";
}
$t0 = $t = start_test();
ary2(50000, 47);
$t = end_test($t, "ary2(50000)");
开发者ID:michaelprem,项目名称:phc,代码行数:30,代码来源:ary2.php
示例4: start_test
}
function start_test()
{
ob_start();
return getmicrotime();
}
function end_test($start, $name)
{
global $total;
$end = getmicrotime();
ob_end_clean();
$total += $end - $start;
$num = number_format($end - $start, 3);
$pad = str_repeat(" ", 24 - strlen($name) - strlen($num));
echo $name . $pad . $num . "\n";
ob_start();
return getmicrotime();
}
function total()
{
global $total;
$pad = str_repeat("-", 24);
echo $pad . "\n";
$num = number_format($total, 3);
$pad = str_repeat(" ", 24 - strlen("Total") - strlen($num));
echo "Total" . $pad . $num . "\n";
}
$t0 = $t = start_test();
ary3(2000);
$t = end_test($t, "ary3(2000)");
开发者ID:michaelprem,项目名称:phc,代码行数:30,代码来源:ary3.php
示例5: start_test
}
function start_test()
{
ob_start();
return getmicrotime();
}
function end_test($start, $name)
{
global $total;
$end = getmicrotime();
ob_end_clean();
$total += $end - $start;
$num = number_format($end - $start, 3);
$pad = str_repeat(" ", 24 - strlen($name) - strlen($num));
echo $name . $pad . $num . "\n";
ob_start();
return getmicrotime();
}
function total()
{
global $total;
$pad = str_repeat("-", 24);
echo $pad . "\n";
$num = number_format($total, 3);
$pad = str_repeat(" ", 24 - strlen("Total") - strlen($num));
echo "Total" . $pad . $num . "\n";
}
$t0 = $t = start_test();
simplecall();
$t = end_test($t, "simplecall");
开发者ID:michaelprem,项目名称:phc,代码行数:30,代码来源:simplecall.php
示例6: start_test
}
function start_test()
{
ob_start();
return getmicrotime();
}
function end_test($start, $name)
{
global $total;
$end = getmicrotime();
ob_end_clean();
$total += $end - $start;
$num = number_format($end - $start, 3);
$pad = str_repeat(" ", 24 - strlen($name) - strlen($num));
echo $name . $pad . $num . "\n";
ob_start();
return getmicrotime();
}
function total()
{
global $total;
$pad = str_repeat("-", 24);
echo $pad . "\n";
$num = number_format($total, 3);
$pad = str_repeat(" ", 24 - strlen("Total") - strlen($num));
echo "Total" . $pad . $num . "\n";
}
$t0 = $t = start_test();
mandel();
$t = end_test($t, "mandel");
开发者ID:michaelprem,项目名称:phc,代码行数:30,代码来源:mandel.php
示例7: start_test
}
function start_test()
{
ob_start();
return getmicrotime();
}
function end_test($start, $name)
{
global $total;
$end = getmicrotime();
ob_end_clean();
$total += $end - $start;
$num = number_format($end - $start, 3);
$pad = str_repeat(" ", 24 - strlen($name) - strlen($num));
echo $name . $pad . $num . "\n";
ob_start();
return getmicrotime();
}
function total()
{
global $total;
$pad = str_repeat("-", 24);
echo $pad . "\n";
$num = number_format($total, 3);
$pad = str_repeat(" ", 24 - strlen("Total") - strlen($num));
echo "Total" . $pad . $num . "\n";
}
$t0 = $t = start_test();
hash1(590000);
$t = end_test($t, "hash1(50000)");
开发者ID:michaelprem,项目名称:phc,代码行数:30,代码来源:hash1.php
示例8: end_test
$x->assign_add_prop(N);
$t = end_test($t, '$this->x += 2', $overhead);
$x->pre_inc_prop(N);
$t = end_test($t, '++$this->x', $overhead);
$x->pre_dec_prop(N);
$t = end_test($t, '--$this->x', $overhead);
$x->post_inc_prop(N);
$t = end_test($t, '$this->x++', $overhead);
$x->post_dec_prop(N);
$t = end_test($t, '$this->x--', $overhead);
$x->isset_prop(N);
$t = end_test($t, 'isset($this->x)', $overhead);
$x->empty_prop(N);
$t = end_test($t, 'empty($this->x)', $overhead);
$x->call(N);
$t = end_test($t, '$this->f()', $overhead);
$x->read_const(N);
$t = end_test($t, '$x = Foo::TEST', $overhead);
create_object(N);
$t = end_test($t, 'new Foo()', $overhead);
read_const(N);
$t = end_test($t, '$x = TEST', $overhead);
read_auto_global(N);
$t = end_test($t, '$x = $_GET', $overhead);
read_global_var(N);
$t = end_test($t, '$x = $GLOBALS[\'v\']', $overhead);
read_hash(N);
$t = end_test($t, '$x = $hash[\'v\']', $overhead);
read_str_offset(N);
$t = end_test($t, '$x = $str[0]', $overhead);
total($t0, "Total");
开发者ID:Jeffy23,项目名称:php-src,代码行数:31,代码来源:micro_bench.php
示例9: main
function main()
{
$tests = array("simple", "simplecall", "simpleucall", "simpleudcall", "mandel", "ackermann", "ary", "ary2", "ary3", "fibo", "hash2", "heapsort", "nestedloop", "sieve", "strcat", "binary_trees", "fannkuch", "fasta", "mandelbrot", "meteor_contest", "n_body", "spectral_norm");
$t0 = $t = start_test();
foreach ($tests as $test) {
// if (!isset($argv[1]) || $argv[1] === $test) {
$test();
$t = end_test($t, $test);
//}
}
//if (!getenv('VERIFY')) {
total();
//}
}
开发者ID:jemmy655,项目名称:hippyvm,代码行数:14,代码来源:bench.php
示例10: start_test
}
function start_test()
{
ob_start();
return getmicrotime();
}
function end_test($start, $name)
{
global $total;
$end = getmicrotime();
ob_end_clean();
$total += $end - $start;
$num = number_format($end - $start, 3);
$pad = str_repeat(" ", 24 - strlen($name) - strlen($num));
echo $name . $pad . $num . "\n";
ob_start();
return getmicrotime();
}
function total()
{
global $total;
$pad = str_repeat("-", 24);
echo $pad . "\n";
$num = number_format($total, 3);
$pad = str_repeat(" ", 24 - strlen("Total") - strlen($num));
echo "Total" . $pad . $num . "\n";
}
$t0 = $t = start_test();
fibo();
$t = end_test($t, "fibo(30)");
开发者ID:michaelprem,项目名称:phc,代码行数:30,代码来源:fibo.php
示例11: start_test
}
function start_test()
{
ob_start();
return getmicrotime();
}
function end_test($start, $name)
{
global $total;
$end = getmicrotime();
ob_end_clean();
$total += $end - $start;
$num = number_format($end - $start, 3);
$pad = str_repeat(" ", 24 - strlen($name) - strlen($num));
echo $name . $pad . $num . "\n";
ob_start();
return getmicrotime();
}
function total()
{
global $total;
$pad = str_repeat("-", 24);
echo $pad . "\n";
$num = number_format($total, 3);
$pad = str_repeat(" ", 24 - strlen("Total") - strlen($num));
echo "Total" . $pad . $num . "\n";
}
$t0 = $t = start_test();
nestedloop(14);
$t = end_test($t, "nestedloop(12)");
开发者ID:michaelprem,项目名称:phc,代码行数:30,代码来源:nestedloop.php
示例12: start_test
}
function start_test()
{
ob_start();
return getmicrotime();
}
function end_test($start, $name)
{
global $total;
$end = getmicrotime();
ob_end_clean();
$total += $end - $start;
$num = number_format($end - $start, 3);
$pad = str_repeat(" ", 24 - strlen($name) - strlen($num));
echo $name . $pad . $num . "\n";
ob_start();
return getmicrotime();
}
function total()
{
global $total;
$pad = str_repeat("-", 24);
echo $pad . "\n";
$num = number_format($total, 3);
$pad = str_repeat(" ", 24 - strlen("Total") - strlen($num));
echo "Total" . $pad . $num . "\n";
}
$t0 = $t = start_test();
hash2(1900);
$t = end_test($t, "hash2(500)");
开发者ID:michaelprem,项目名称:phc,代码行数:30,代码来源:hash2.php
示例13: start_test
}
function start_test()
{
ob_start();
return getmicrotime();
}
function end_test($start, $name)
{
global $total;
$end = getmicrotime();
ob_end_clean();
$total += $end - $start;
$num = number_format($end - $start, 3);
$pad = str_repeat(" ", 24 - strlen($name) - strlen($num));
echo $name . $pad . $num . "\n";
ob_start();
return getmicrotime();
}
function total()
{
global $total;
$pad = str_repeat("-", 24);
echo $pad . "\n";
$num = number_format($total, 3);
$pad = str_repeat(" ", 24 - strlen("Total") - strlen($num));
echo "Total" . $pad . $num . "\n";
}
$t0 = $t = start_test();
heapsort(76000);
$t = end_test($t, "heapsort(20000)");
开发者ID:michaelprem,项目名称:phc,代码行数:30,代码来源:heapsort.php
示例14: start_test
}
function start_test()
{
ob_start();
return getmicrotime();
}
function end_test($start, $name)
{
global $total;
$end = getmicrotime();
ob_end_clean();
$total += $end - $start;
$num = number_format($end - $start, 3);
$pad = str_repeat(" ", 24 - strlen($name) - strlen($num));
echo $name . $pad . $num . "\n";
ob_start();
return getmicrotime();
}
function total()
{
global $total;
$pad = str_repeat("-", 24);
echo $pad . "\n";
$num = number_format($total, 3);
$pad = str_repeat(" ", 24 - strlen("Total") - strlen($num));
echo "Total" . $pad . $num . "\n";
}
$t0 = $t = start_test();
matrix(99);
$t = end_test($t, "matrix(20)");
开发者ID:michaelprem,项目名称:phc,代码行数:30,代码来源:matrix.php
示例15: simpleudcall
simpleudcall();
$t = end_test($t, "simpleudcall");
mandel();
$t = end_test($t, "mandel");
mandel2();
$t = end_test($t, "mandel2");
ackermann(7);
$t = end_test($t, "ackermann(7)");
ary(50000);
$t = end_test($t, "ary(50000)");
ary2(50000);
$t = end_test($t, "ary2(50000)");
ary3(2000);
$t = end_test($t, "ary3(2000)");
fibo(30);
$t = end_test($t, "fibo(30)");
hash1(50000);
$t = end_test($t, "hash1(50000)");
hash2(500);
$t = end_test($t, "hash2(500)");
heapsort(20000);
$t = end_test($t, "heapsort(20000)");
matrix(20);
$t = end_test($t, "matrix(20)");
nestedloop(12);
$t = end_test($t, "nestedloop(12)");
sieve(30);
$t = end_test($t, "sieve(30)");
strcat(200000);
$t = end_test($t, "strcat(200000)");
total($t0, "Total");
开发者ID:cefalo19,项目名称:php-src,代码行数:31,代码来源:bench.php
示例16: start_test
echo "Total" . $pad . $num . "\n";
}
const N = 5000000;
echo "Benchmark Zephir " . \Zephir\Compiler::VERSION . " \n";
$t = start_test();
$x = new \Test\Bench\Foo();
$x->empty_for_in_range(N);
$t = end_test($t, 'empty for in range');
$x->read_prop(N);
$t = end_test($t, '$x = $this->x');
$x->write_prop(N);
$t = end_test($t, '$this->x = 0');
$x->assign_add_prop(N);
$t = end_test($t, '$this->x += 2');
//$x->pre_inc_prop(N);
//$t = end_test($t, '++$this->x');
//$x->pre_dec_prop(N);
//$t = end_test($t, '--$this->x');
$x->post_inc_prop(N);
$t = end_test($t, '$this->x++');
$x->post_dec_prop(N);
$t = end_test($t, '$this->x--');
$x->isset_prop(N);
$t = end_test($t, 'isset($this->x)');
$x->empty_prop(N);
$t = end_test($t, 'empty($this->x)');
$x->call(N);
$t = end_test($t, '$this->f()');
$x->read_const(N);
$t = end_test($t, '$x = Foo::TEST');
total();
开发者ID:chet0xhenry,项目名称:zephir,代码行数:31,代码来源:microbench.php
示例17: start_test
}
function start_test()
{
ob_start();
return getmicrotime();
}
function end_test($start, $name)
{
global $total;
$end = getmicrotime();
ob_end_clean();
$total += $end - $start;
$num = number_format($end - $start, 3);
$pad = str_repeat(" ", 24 - strlen($name) - strlen($num));
echo $name . $pad . $num . "\n";
ob_start();
return getmicrotime();
}
function total()
{
global $total;
$pad = str_repeat("-", 24);
echo $pad . "\n";
$num = number_format($total, 3);
$pad = str_repeat(" ", 24 - strlen("Total") - strlen($num));
echo "Total" . $pad . $num . "\n";
}
$t0 = $t = start_test();
simple();
$t = end_test($t, "simple");
开发者ID:michaelprem,项目名称:phc,代码行数:30,代码来源:simple.php
示例18: end_test
$t = end_test($t, 'self::f()', $overhead);
call_static(N);
$t = end_test($t, 'Foo::f()', $overhead);
$x = new Foo();
$x->read_prop(N);
$t = end_test($t, '$x = $this->x', $overhead);
$x->write_prop(N);
$t = end_test($t, '$this->x = 0', $overhead);
$x->assign_add_prop(N);
$t = end_test($t, '$this->x += 2', $overhead);
$x->pre_inc_prop(N);
$t = end_test($t, '++$this->x', $overhead);
$x->pre_dec_prop(N);
$t = end_test($t, '--$this->x', $overhead);
$x->post_inc_prop(N);
$t = end_test($t, '$this->x++', $overhead);
$x->post_dec_prop(N);
$t = end_test($t, '$this->x--', $overhead);
$x->isset_prop(N);
$t = end_test($t, 'isset($this->x)', $overhead);
$x->empty_prop(N);
$t = end_test($t, 'empty($this->x)', $overhead);
$x->call(N);
$t = end_test($t, '$this->f()', $overhead);
$x->read_const(N);
$t = end_test($t, '$x = Foo::TEST', $overhead);
create_object(N);
$t = end_test($t, 'new Foo()', $overhead);
read_const(N);
$t = end_test($t, '$x = TEST', $overhead);
total($t0, "Total");
开发者ID:aholmes,项目名称:php-src,代码行数:31,代码来源:micro_bench.php
示例19: end_test
}
end_test('Repeated send (small array)', 'http 11', $response);
}
/*begin_test('Repeated send (small array)', 'multicall');
$response =& $c->send($msgs);
end_test('Repeated send (small array)', 'multicall', $response);*/
if (function_exists('gzinflate')) {
$c->accepted_compression = array('gzip');
$c->request_compression = 'gzip';
begin_test('Repeated send (small array)', 'http 10 w. compression');
$response = array();
for ($i = 0; $i < 25; $i++) {
$resp =& $c->send($msg);
$response[] = $resp->value();
}
end_test('Repeated send (small array)', 'http 10 w. compression', $response);
}
}
function begin_test($test_name, $test_case)
{
global $test_results;
if (!isset($test_results[$test_name])) {
$test_results[$test_name] = array();
}
$test_results[$test_name][$test_case] = array();
list($micro, $sec) = explode(' ', microtime());
$test_results[$test_name][$test_case]['time'] = $sec + $micro;
}
function end_test($test_name, $test_case, $test_result)
{
global $test_results;
开发者ID:rahulsiwal,项目名称:younity,代码行数:31,代码来源:benchmark.php
示例20: start_test
}
function start_test()
{
ob_start();
return getmicrotime();
}
function end_test($start, $name)
{
global $total;
$end = getmicrotime();
ob_end_clean();
$total += $end - $start;
$num = number_format($end - $start, 3);
$pad = str_repeat(" ", 24 - strlen($name) - strlen($num));
echo $name . $pad . $num . "\n";
ob_start();
return getmicrotime();
}
function total()
{
global $total;
$pad = str_repeat("-", 24);
echo $pad . "\n";
$num = number_format($total, 3);
$pad = str_repeat(" ", 24 - strlen("Total") - strlen($num));
echo "Total" . $pad . $num . "\n";
}
$t0 = $t = start_test();
ackermann();
$t = end_test($t, "ackermann()");
开发者ID:michaelprem,项目名称:phc,代码行数:30,代码来源:ackermann.php
注:本文中的end_test函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论