Mantis - Quercus
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
2186 | minor | always | 11-18-07 15:06 | 11-19-07 20:16 | |
|
|||||
Reporter: | koreth | Platform: | |||
Assigned To: | nam | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 3.1.4 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in 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. |
||||
Steps To Reproduce: | |||||
Additional Information: | |||||
Relationships | |||||
Attached Files: | patch.txt [^] (1,509 bytes) 11-18-07 15:41 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|