Anonymous | Login | Signup for a new account | 10-08-2024 13:46 PDT |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0002186 | [Quercus] | minor | always | 11-18-07 15:06 | 11-19-07 20:16 | ||||
Reporter | koreth | View Status | public | ||||||
Assigned To | nam | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.1.4 | ||||||
Summary | 0002186: microtime() is only millisecond-accurate | ||||||||
Description |
I was doing some performance tests in compiled mode and noticed my run times had much less noise than expected: <?php $start_time = microtime(true); include_once $_SERVER['PHP_ROOT'].'/lib/core/init.php'; print "elapsed = " . (microtime(true) - $start_time) . " sec\n"; elapsed = 0.006000041961669922 sec elapsed = 0.003000020980834961 sec elapsed = 0.0029997825622558594 sec elapsed = 0.003000020980834961 sec elapsed = 0.003000020980834961 sec elapsed = 0.003000020980834961 sec elapsed = 0.003000020980834961 sec elapsed = 0.003000020980834961 sec elapsed = 0.002000093460083008 sec elapsed = 0.003000020980834961 sec The Zend PHP interpreter is much more accurate. This lack of precision makes it much harder to do meaningful internal performance monitoring in a PHP app -- and in particular, to benchmark Quercus versus vanilla PHP and identify their respective bottlenecks -- since most operations will appear to take either no time at all or 1 millisecond depending on whether they happen to straddle a millisecond boundary. |
||||||||
Additional Information | |||||||||
Attached Files | patch.txt [^] (1,509 bytes) 11-18-07 15:41 | ||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
34 total queries executed. 28 unique queries executed. |