cvs: php4 /pear/Benchmark Iterate.php

From: Date: Tue, 21 Aug 2001 21:56:53 +0000
Subject: cvs: php4 /pear/Benchmark Iterate.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-614@lists.php.net to get a copy of this message
yavo Tue Aug 21 17:56:53 2001 EDT Modified files: /php4/pear/Benchmark Iterate.php Log: - run(100, "obj->method", "test") syntax should work now Index: php4/pear/Benchmark/Iterate.php diff -u php4/pear/Benchmark/Iterate.php:1.9 php4/pear/Benchmark/Iterate.php:1.10 --- php4/pear/Benchmark/Iterate.php:1.9 Thu Jul 26 02:48:33 2001 +++ php4/pear/Benchmark/Iterate.php Tue Aug 21 17:56:52 2001 @@ -16,7 +16,7 @@ // | Authors: Sebastian Bergmann <sb@sebastian-bergmann.de> | // +----------------------------------------------------------------------+ // -// $Id: Iterate.php,v 1.9 2001/07/26 06:48:33 sbergmann Exp $ +// $Id: Iterate.php,v 1.10 2001/08/21 21:56:52 yavo Exp $ // require_once 'Benchmark/Timer.php'; @@ -29,7 +29,7 @@ * Benchmarking * * Example: -* +* a) * require_once 'Benchmark/Iterate.php'; * $benchmark = new Benchmark_Iterate; * @@ -39,9 +39,39 @@ * * $benchmark->run(100, 'foo', 'test'); * $result = $benchmark->get(); +* +* b) +* require_once 'Benchmark/Iterate.php'; +* $benchmark = new Benchmark_Iterate; +* +* class myclass{ +* +* function foo($string) { +* print $string . '<br>'; +* } +* } +* +* $benchmark->run(100, 'myclass::foo', 'test'); +* $result = $benchmark->get(); +* +* c) +* require_once 'Benchmark/Iterate.php'; +* $benchmark = new Benchmark_Iterate; * +* class myclass{ +* +* function foo($string) { +* print $string . '<br>'; +* } +* } +* +* $myobj = new myclass(); +* +* $benchmark->run(100, 'myobj->foo', 'test'); +* $result = $benchmark->get(); +* * @author Sebastian Bergmann <sb@sebastian-bergmann.de> -* @version $Revision: 1.9 $ +* @version $Revision: 1.10 $ * @access public */ @@ -76,6 +106,7 @@ call_user_method_array($function_name[1], ${$objectname}, $arguments); $this->setMarker('end_' . $i); } + return(0); } for ($i = 1; $i <= $iterations; $i++) {

« previous php.pear.cvs (#614) next »