Class Benchmark_Iterate

Description

Benchmark::Benchmark_Iterate

Purpose:

Benchmarking

Example: a) require_once 'Benchmark/Iterate.php'; $benchmark = new Benchmark_Iterate;

function foo($string) { print $string . '
'; }

$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 . '
'; } }

$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 . '
'; } }

$myobj = new myclass();

$benchmark->run(100, 'myobj->foo', 'test'); $result = $benchmark->get();

Located in /libraries/pear/Benchmark/Iterate.php (line 74)

PEAR
   |
   --Benchmark_Timer
      |
      --Benchmark_Iterate
Method Summary
 array get ()
 void run ()
Variables
Methods
get (line 126)

Returns benchmark result.

$result[x ] = execution time of iteration x $result['mean' ] = mean execution time $result['iterations'] = number of iterations

  • access: public
array get ()
run (line 81)

Benchmarks a function.

  • access: public
void run ()

Inherited Methods

Inherited From Benchmark_Timer

 Benchmark_Timer::Benchmark_Timer()
 Benchmark_Timer::display()
 Benchmark_Timer::getOutput()
 Benchmark_Timer::getProfiling()
 Benchmark_Timer::setMarker()
 Benchmark_Timer::start()
 Benchmark_Timer::stop()
 Benchmark_Timer::timeElapsed()
 Benchmark_Timer::_Benchmark_Timer()

Documentation generated on Fri, 11 Feb 2005 18:13:27 +0000 by phpDocumentor 1.3.0RC3