1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<?php echo "test started... "; ob_flush(); Benchmark::add_spot('100.000 x md5'); for($i = 0 ; $i<100000 ; $i++) $x = md5($i); Benchmark::add_spot('100.000 x sha'); for($i = 0 ; $i<100000 ; $i++) $x = sha1($i); Benchmark::add_spot('end'); Benchmark::render_report('code'); echo "test completed!"; die();