com php-src: improve timings evaluations in test: ext/standard/ tests/streams/proc_open_bug69900.phpt

From: Date: Thu, 02 Jul 2015 12:23:06 +0000
Subject: com php-src: improve timings evaluations in test: ext/standard/ tests/streams/proc_open_bug69900.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-87691@lists.php.net to get a copy of this message
Commit: a88c68f833efeee552fdcb255787eee680a7e76e Author: Christoph M. Becker <cmb@php.net> Thu, 2 Jul 2015 10:51:26 +0200 Committer: Anatol Belski <ab@php.net> Thu, 2 Jul 2015 14:23:06 +0200 Parents: cefca3569296aaedd56f9ca32f95474877bfe6e1 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a88c68f833efeee552fdcb255787eee680a7e76e Log: improve timings evaluations in test Changed paths: M ext/standard/tests/streams/proc_open_bug69900.phpt Diff: diff --git a/ext/standard/tests/streams/proc_open_bug69900.phpt b/ext/standard/tests/streams/proc_open_bug69900.phpt index b352329..c98fd97 100644 --- a/ext/standard/tests/streams/proc_open_bug69900.phpt +++ b/ext/standard/tests/streams/proc_open_bug69900.phpt @@ -33,7 +33,7 @@ for($i = 0; $i < 10; $i++){ $t1 = microtime(1); echo $s; - echo "fgets() took ", (($t1 - $t0)*1000), "ms\n"; + echo "fgets() took ", (($t1 - $t0)*1000 > 1 ? 'more' : 'less'), " than 1 ms\n"; } fclose($pipes[0]); @@ -48,25 +48,25 @@ proc_close($process); $fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test69900.php"; @unlink($fl); ?> ---EXPECTF-- +--EXPECT-- hello0 -fgets() took %d%sms +fgets() took more than 1 ms hello1 -fgets() took 0%sms +fgets() took less than 1 ms hello2 -fgets() took 0%sms +fgets() took less than 1 ms hello3 -fgets() took 0%sms +fgets() took less than 1 ms hello4 -fgets() took 0%sms +fgets() took less than 1 ms hello5 -fgets() took 0%sms +fgets() took less than 1 ms hello6 -fgets() took 0%sms +fgets() took less than 1 ms hello7 -fgets() took 0%sms +fgets() took less than 1 ms hello8 -fgets() took 0%sms +fgets() took less than 1 ms hello9 -fgets() took 0%sms +fgets() took less than 1 ms ===DONE===

« previous php.cvs (#87691) next »