RFD: Benchmark::Benchmark

From: Date: Thu, 28 Sep 2000 15:35:48 +0000
Subject: RFD: Benchmark::Benchmark
Groups: php.pear 
Request: Send a blank email to php-pear+get-291@lists.php.net to get a copy of this message
Now that we have Benchmark::Timer in the repository I'm wondering about a class for benchmarking code during a given number of iterations, called Benchmark::Benchmark. At the moment I'm thinking about a usage concept as follows: <?php // all the code to be benchmarked goes here // ... function my_benchmark() { // here is the code that gets called during each iteration // of the benchmark; it calls / uses the code above } $benchmark = new Benchmark; $benchmark->benchmark( "my_benchmark", number_of_iterations ); ?> A method similar to Timer->get_profiling() can then be used to retrieve the benchmark's result. Any comments appreciated, Sebastian -- <?php $a=explode(" " ,"119 130 128 129 45 110 123 124 129 117 114 127 45 ". "125 117 125 45 117 110 112 120 114 127");for($i=0;$i<sizeof($a);$i++)print chr($a[$i]-13); /* http://sb.phpOpenTracker.de | sb@phpOpenTracker.de */ ?>

« previous php.pear (#291) next »