本文整理汇总了PHP中end_test函数的典型用法代码示例。如果您正苦于以下问题:PHP end_test函数的具体用法?PHP end_test怎么用?PHP end_test使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了end_test函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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");
示例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;
示例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)");
示例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)");
示例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");
示例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");
示例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)");
示例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");
示例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();
//}
}
示例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)");
示例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)");
示例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)");
示例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)");
示例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)");
示例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");